home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / XLIB612.ZIP / DOCS.ZIP / AMIPRO.ZIP / XLIBREF.SAM (.txt)
Encoding:
Ami Pro/Word Pro document  |  1993-10-28  |  201.0 KB  |  4,256 lines

  1. [ver]
  2. [sty]
  3.     _DEFAULT.STY
  4. [files]
  5. [charset]
  6.     ANSI (Windows, IBM CP 1252)
  7. [revisions]
  8. [toc]
  9.     Title
  10.     Subhead
  11.     Table Text
  12. [master]
  13. [prn]
  14.     IBM Graphics
  15. [port]
  16.     LPT1:
  17. [lang]
  18. [desc]
  19.     751837878
  20.     750467900
  21.     3561
  22. [fopts]
  23. [lnopts]
  24.     Body Text
  25. [docopts]
  26. [GramStyle]
  27. [ParaNum]
  28. [tag]
  29.     TOCPG1
  30.     [fnt]
  31.         Times New Roman
  32.         240
  33.         49155
  34.     [algn]
  35.     [spc]
  36.         273
  37.         100
  38.     [brk]
  39.     [line]
  40.     [spec]
  41.     [nfmt]
  42.         272
  43.     TOCPG1
  44. [tag]
  45.     TOC2
  46.     [fnt]
  47.         Times New Roman
  48.         240
  49.         49152
  50.     [algn]
  51.         360
  52.         720
  53.     [spc]
  54.         273
  55.         100
  56.     [brk]
  57.     [line]
  58.     [spec]
  59.     [nfmt]
  60.         280
  61.     TOC2
  62. [tag]
  63.     TOCPG2
  64.     [fnt]
  65.         Times New Roman
  66.         240
  67.         49152
  68.     [algn]
  69.     [spc]
  70.         273
  71.         100
  72.     [brk]
  73.     [line]
  74.     [spec]
  75.     [nfmt]
  76.         280
  77.     TOCPG2
  78. [tag]
  79.     TOC3
  80.     [fnt]
  81.         Times New Roman
  82.         240
  83.         49152
  84.     [algn]
  85.         720
  86.         1080
  87.     [spc]
  88.         273
  89.         100
  90.     [brk]
  91.     [line]
  92.     [spec]
  93.     [nfmt]
  94.         280
  95.     TOC3
  96. [tag]
  97.     TOCPG3
  98.     [fnt]
  99.         Times New Roman
  100.         240
  101.         49152
  102.     [algn]
  103.     [spc]
  104.         273
  105.         100
  106.     [brk]
  107.     [line]
  108.     [spec]
  109.     [nfmt]
  110.         280
  111.     TOCPG3
  112. [tag]
  113.     TOC4
  114.     [fnt]
  115.         Times New Roman
  116.         240
  117.         49152
  118.     [algn]
  119.         1080
  120.         1440
  121.     [spc]
  122.         273
  123.         100
  124.     [brk]
  125.     [line]
  126.     [spec]
  127.     [nfmt]
  128.         280
  129.     TOC4
  130. [tag]
  131.     TOCPG4
  132.     [fnt]
  133.         Times New Roman
  134.         240
  135.         49152
  136.     [algn]
  137.     [spc]
  138.         273
  139.         100
  140.     [brk]
  141.     [line]
  142.     [spec]
  143.     [nfmt]
  144.         280
  145.     TOCPG4
  146. [tag]
  147.     TOC5
  148.     [fnt]
  149.         Times New Roman
  150.         240
  151.         49152
  152.     [algn]
  153.         1440
  154.         1800
  155.     [spc]
  156.         273
  157.         100
  158.     [brk]
  159.     [line]
  160.     [spec]
  161.     [nfmt]
  162.         280
  163.     TOC5
  164. [tag]
  165.     TOCPG5
  166.     [fnt]
  167.         Times New Roman
  168.         240
  169.         49152
  170.     [algn]
  171.     [spc]
  172.         273
  173.         100
  174.     [brk]
  175.     [line]
  176.     [spec]
  177.     [nfmt]
  178.         280
  179.     TOCPG5
  180. [tag]
  181.     TOC6
  182.     [fnt]
  183.         Times New Roman
  184.         240
  185.         49152
  186.     [algn]
  187.         1800
  188.         2160
  189.     [spc]
  190.         273
  191.         100
  192.     [brk]
  193.     [line]
  194.     [spec]
  195.     [nfmt]
  196.         280
  197.     TOC6
  198. [tag]
  199.     TOCPG6
  200.     [fnt]
  201.         Times New Roman
  202.         240
  203.         49152
  204.     [algn]
  205.     [spc]
  206.         273
  207.         100
  208.     [brk]
  209.     [line]
  210.     [spec]
  211.     [nfmt]
  212.         280
  213.     TOCPG6
  214. [tag]
  215.     TOC7
  216.     [fnt]
  217.         Times New Roman
  218.         240
  219.         49152
  220.     [algn]
  221.         2160
  222.         2520
  223.     [spc]
  224.         273
  225.         100
  226.     [brk]
  227.     [line]
  228.     [spec]
  229.     [nfmt]
  230.         280
  231.     TOC7
  232. [tag]
  233.     TOCPG7
  234.     [fnt]
  235.         Times New Roman
  236.         240
  237.         49152
  238.     [algn]
  239.     [spc]
  240.         273
  241.         100
  242.     [brk]
  243.     [line]
  244.     [spec]
  245.     [nfmt]
  246.         280
  247.     TOCPG7
  248. [tag]
  249.     TOC8
  250.     [fnt]
  251.         Times New Roman
  252.         240
  253.         49152
  254.     [algn]
  255.         2520
  256.         2880
  257.     [spc]
  258.         273
  259.         100
  260.     [brk]
  261.     [line]
  262.     [spec]
  263.     [nfmt]
  264.         280
  265.     TOC8
  266. [tag]
  267.     TOCPG8
  268.     [fnt]
  269.         Times New Roman
  270.         240
  271.         49152
  272.     [algn]
  273.     [spc]
  274.         273
  275.         100
  276.     [brk]
  277.     [line]
  278.     [spec]
  279.     [nfmt]
  280.         280
  281.     TOCPG8
  282. [tag]
  283.     TOC9
  284.     [fnt]
  285.         Times New Roman
  286.         240
  287.         49152
  288.     [algn]
  289.         2880
  290.         3240
  291.     [spc]
  292.         273
  293.         100
  294.     [brk]
  295.     [line]
  296.     [spec]
  297.     [nfmt]
  298.         280
  299.     TOC9
  300. [tag]
  301.     TOCPG9
  302.     [fnt]
  303.         Times New Roman
  304.         240
  305.         49152
  306.     [algn]
  307.     [spc]
  308.         273
  309.         100
  310.     [brk]
  311.     [line]
  312.     [spec]
  313.     [nfmt]
  314.         280
  315.     TOCPG9
  316. [tag]
  317.     Table Text
  318.     [fnt]
  319.         Times New Roman
  320.         240
  321.         49152
  322.     [algn]
  323.     [spc]
  324.         273
  325.         100
  326.     [brk]
  327.     [line]
  328.     [spec]
  329.     [nfmt]
  330.         280
  331.     Table Text
  332. [frm]
  333.     68681924
  334.     1440
  335.     1440
  336.     10800
  337.     8179
  338.     1 0 0 0 0 0 0
  339.     16777215
  340.     0 29440
  341.     [frmlay]
  342.         1726
  343.         9360
  344.         1440
  345.         1584
  346.         10656
  347.     [tbl]
  348.          222 2 286 86 4569 86 1 43 43
  349.         [h]
  350.              0 286 86 2 0 2 0
  351.              1 286 86 2 0 2 0
  352.              2 286 86 2 0 2 0
  353.              3 286 86 2 0 2 0
  354.              4 286 86 2 0 2 0
  355.              5 286 86 2 0 2 0
  356.              6 286 86 2 0 2 0
  357.              7 286 86 2 0 2 0
  358.              8 286 86 2 0 2 0
  359.              9 286 86 2 0 2 0
  360.              10 286 86 2 0 2 0
  361.              11 286 86 2 0 2 0
  362.              12 286 86 2 0 2 0
  363.              13 286 86 2 0 2 0
  364.              14 286 86 2 0 2 0
  365.              15 286 86 2 0 2 0
  366.              16 286 86 2 0 2 0
  367.              17 286 86 2 0 2 0
  368.              18 286 86 2 0 2 0
  369.              19 286 86 2 0 2 0
  370.              20 286 86 2 0 2 0
  371.              21 286 86 2 0 2 0
  372.              22 286 86 2 0 2 0
  373.              23 286 86 2 0 2 0
  374.              24 286 86 2 0 2 0
  375.              25 286 86 2 0 2 0
  376.              26 286 86 2 0 2 0
  377.              27 286 86 2 0 2 0
  378.              28 286 86 2 0 2 0
  379.              29 286 86 2 0 2 0
  380.              30 286 86 2 0 2 0
  381.              31 286 86 2 0 2 0
  382.              32 286 86 2 0 2 0
  383.              33 286 86 2 0 2 0
  384.              34 286 86 2 0 2 0
  385.              35 286 86 2 0 2 0
  386.              36 286 86 2 0 2 0
  387.              37 286 86 2 0 2 0
  388.              38 286 86 2 0 2 0
  389.              39 286 86 2 0 2 0
  390.              40 286 86 2 0 2 0
  391.              41 286 86 2 0 2 0
  392.              42 286 86 2 0 2 0
  393.              43 286 86 2 0 2 0
  394.              44 286 86 2 0 2 0
  395.              45 286 86 2 0 2 0
  396.              46 286 86 2 0 2 0
  397.              47 286 86 2 0 2 0
  398.              48 286 86 2 0 2 0
  399.              49 286 86 2 0 2 0
  400.              50 286 86 2 0 2 0
  401.              51 286 86 2 0 2 0
  402.              52 286 86 2 0 2 0
  403.              53 286 86 2 0 2 0
  404.              54 286 86 2 0 2 0
  405.              55 286 86 2 0 2 0
  406.              56 286 86 2 0 2 0
  407.              57 286 86 2 0 2 0
  408.              58 286 86 2 0 2 0
  409.              59 286 86 2 0 2 0
  410.              60 286 86 2 0 2 0
  411.              61 286 86 2 0 2 0
  412.              62 286 86 2 0 2 0
  413.              63 286 86 2 0 2 0
  414.              64 286 86 2 0 2 0
  415.              65 286 86 2 0 2 0
  416.              66 286 86 2 0 2 0
  417.              67 286 86 2 0 2 0
  418.              68 286 86 2 0 2 0
  419.              69 286 86 2 0 2 0
  420.              70 286 86 2 0 2 0
  421.              71 286 86 2 0 2 0
  422.              72 286 86 2 0 2 0
  423.              73 286 86 2 0 2 0
  424.              74 286 86 2 0 2 0
  425.              75 286 86 2 0 2 0
  426.              76 286 86 2 0 2 0
  427.              77 286 86 2 0 2 0
  428.              78 286 86 2 0 2 0
  429.              79 286 86 2 0 2 0
  430.              80 286 86 2 0 2 0
  431.              81 286 86 2 0 2 0
  432.              82 286 86 2 0 2 0
  433.              83 286 86 2 0 2 0
  434.              84 286 86 2 0 2 0
  435.              85 286 86 2 0 2 0
  436.              86 286 86 2 0 2 0
  437.              87 286 86 2 0 2 0
  438.              88 286 86 2 0 2 0
  439.              89 286 86 2 0 2 0
  440.              90 286 86 2 0 2 0
  441.              91 286 86 2 0 2 0
  442.              92 286 86 2 0 2 0
  443.              93 286 86 2 0 2 0
  444.              94 286 86 2 0 2 0
  445.              95 286 86 2 0 2 0
  446.              96 286 86 2 0 2 0
  447.              97 286 86 2 0 2 0
  448.              98 286 86 2 0 2 0
  449.              99 286 86 2 0 2 0
  450.              100 286 86 2 0 2 0
  451.              101 286 86 2 0 2 0
  452.              102 286 86 2 0 2 0
  453.              103 286 86 2 0 2 0
  454.              104 286 86 2 0 2 0
  455.              105 286 86 2 0 2 0
  456.              106 286 86 2 0 2 0
  457.              107 286 86 2 0 2 0
  458.              108 286 86 2 0 2 0
  459.              109 286 86 2 0 2 0
  460.              110 286 86 2 0 2 0
  461.              111 286 86 2 0 2 0
  462.              112 286 86 2 0 2 0
  463.              113 286 86 2 0 2 0
  464.              114 286 86 2 0 2 0
  465.              115 286 86 2 0 2 0
  466.              116 286 86 2 0 2 0
  467.              117 286 86 2 0 2 0
  468.              118 286 86 2 0 2 0
  469.              119 286 86 2 0 2 0
  470.              120 286 86 2 0 2 0
  471.              121 286 86 2 0 2 0
  472.              122 286 86 2 0 2 0
  473.              123 286 86 2 0 2 0
  474.              124 286 86 2 0 2 0
  475.              125 286 86 2 0 2 0
  476.              126 286 86 2 0 2 0
  477.              127 286 86 2 0 2 0
  478.              128 286 86 2 0 2 0
  479.              129 286 86 2 0 2 0
  480.              130 286 86 2 0 2 0
  481.              131 286 86 2 0 2 0
  482.              132 286 86 2 0 2 0
  483.              133 286 86 2 0 2 0
  484.              134 286 86 2 0 2 0
  485.              135 286 86 2 0 2 0
  486.              136 286 86 2 0 2 0
  487.              137 286 86 2 0 2 0
  488.              138 286 86 2 0 2 0
  489.              139 286 86 2 0 2 0
  490.              140 286 86 2 0 2 0
  491.              141 286 86 2 0 2 0
  492.              142 286 86 2 0 2 0
  493.              143 286 86 2 0 2 0
  494.              144 286 86 2 0 2 0
  495.              145 286 86 2 0 2 0
  496.              146 286 86 2 0 2 0
  497.              147 286 86 2 0 2 0
  498.              148 286 86 2 0 2 0
  499.              149 286 86 2 0 2 0
  500.              150 286 86 2 0 2 0
  501.              151 286 86 2 0 2 0
  502.              152 286 86 2 0 2 0
  503.              153 286 86 2 0 2 0
  504.              154 286 86 2 0 2 0
  505.              155 286 86 2 0 2 0
  506.              156 286 86 2 0 2 0
  507.              157 286 86 2 0 2 0
  508.              158 286 86 2 0 2 0
  509.              159 286 86 2 0 2 0
  510.              160 286 86 2 0 2 0
  511.              161 286 86 2 0 2 0
  512.              162 286 86 2 0 2 0
  513.              163 286 86 2 0 2 0
  514.              164 286 86 2 0 2 0
  515.              165 286 86 2 0 2 0
  516.              166 286 86 2 0 2 0
  517.              167 286 86 2 0 2 0
  518.              168 286 86 2 0 2 0
  519.              169 286 86 2 0 2 0
  520.              170 286 86 2 0 2 0
  521.              171 286 86 2 0 2 0
  522.              172 286 86 2 0 2 0
  523.              173 286 86 2 0 2 0
  524.              174 286 86 2 0 2 0
  525.              175 286 86 2 0 2 0
  526.              176 286 86 2 0 2 0
  527.              177 286 86 2 0 2 0
  528.              178 286 86 2 0 2 0
  529.              179 286 86 2 0 2 0
  530.              180 286 86 2 0 2 0
  531.              181 286 86 2 0 2 0
  532.              182 286 86 2 0 2 0
  533.              183 286 86 2 0 2 0
  534.              184 286 86 2 0 2 0
  535.              185 286 86 2 0 2 0
  536.              186 286 86 2 0 2 0
  537.              187 286 86 2 0 2 0
  538.              188 286 86 2 0 2 0
  539.              189 286 86 2 0 2 0
  540.              190 286 86 2 0 2 0
  541.              191 286 86 2 0 2 0
  542.              192 286 86 2 0 2 0
  543.              193 286 86 2 0 2 0
  544.              194 286 86 2 0 2 0
  545.              195 286 86 2 0 2 0
  546.              196 286 86 2 0 2 0
  547.              197 286 86 2 0 2 0
  548.              198 286 86 2 0 2 0
  549.              199 286 86 2 0 2 0
  550.              200 286 86 2 0 2 0
  551.              201 286 86 2 0 2 0
  552.              202 286 86 2 0 2 0
  553.              203 286 86 2 0 2 0
  554.              204 286 86 2 0 2 0
  555.              205 286 86 2 0 2 0
  556.              206 286 86 2 0 2 0
  557.              207 286 86 2 0 2 0
  558.              208 286 86 2 0 2 0
  559.              209 286 86 2 0 2 0
  560.              210 286 86 2 0 2 0
  561.              211 286 86 2 0 2 0
  562.              212 286 86 2 0 2 0
  563.              213 286 86 2 0 2 0
  564.              214 286 86 2 0 2 0
  565.              215 286 86 2 0 2 0
  566.              216 286 86 2 0 2 0
  567.              217 286 86 2 0 2 0
  568.              218 286 86 2 0 2 0
  569.              219 286 86 2 0 2 0
  570.              220 286 86 2 0 2 0
  571.              221 286 86 2 0 2 0
  572.         [e]
  573.         [w]
  574.              0 8274 86 2 0
  575.              1 914 86 2 0
  576.         [e]
  577.         [data]
  578.              50 0 16384 0 0 0 0 1 0 0 0 0
  579. @TOC3@x_rot_pal_raw
  580.              50 1 16384 0 0 0 0 1 0 0 0 0
  581. @TOCPG3@23.00
  582.              51 0 16384 0 0 0 0 1 0 0 0 0
  583. @TOC3@x_put_contrast_pal_struc
  584.              51 1 16384 0 0 0 0 1 0 0 0 0
  585. @TOCPG3@24.00
  586.              52 0 16384 0 0 0 0 1 0 0 0 0
  587. @TOC3@x_transpose_pal_struc
  588.              52 1 16384 0 0 0 0 1 0 0 0 0
  589. @TOCPG3@24.00
  590.              53 0 16384 0 0 0 0 1 0 0 0 0
  591. @TOC3@x_cpcontrast_pal_struc
  592.              53 1 16384 0 0 0 0 1 0 0 0 0
  593. @TOCPG3@24.00
  594.              54 0 16384 0 0 0 0 1 0 0 0 0
  595. @TOC1@MODULE XLINE
  596.              54 1 16384 0 0 0 0 1 0 0 0 0
  597. @TOCPG1@25.00
  598.              55 0 16384 0 0 0 0 1 0 0 0 0
  599. @TOC2@SOURCES
  600.              55 1 16384 0 0 0 0 1 0 0 0 0
  601. @TOCPG2@25.00
  602.              56 0 16384 0 0 0 0 1 0 0 0 0
  603. @TOC2@C HEADER FILE
  604.              56 1 16384 0 0 0 0 1 0 0 0 0
  605. @TOCPG2@25.00
  606.              57 0 16384 0 0 0 0 1 0 0 0 0
  607. @TOC2@EXPORTED FUNCTIONS
  608.              57 1 16384 0 0 0 0 1 0 0 0 0
  609. @TOCPG2@26.00
  610.              58 0 16384 0 0 0 0 1 0 0 0 0
  611. @TOC3@x_line
  612.              58 1 16384 0 0 0 0 1 0 0 0 0
  613. @TOCPG3@26.00
  614.              59 0 16384 0 0 0 0 1 0 0 0 0
  615. @TOC1@MODULE XTEXT
  616.              59 1 16384 0 0 0 0 1 0 0 0 0
  617. @TOCPG1@27.00
  618.              60 0 16384 0 0 0 0 1 0 0 0 0
  619. @TOC2@SOURCES
  620.              60 1 16384 0 0 0 0 1 0 0 0 0
  621. @TOCPG2@27.00
  622.              61 0 16384 0 0 0 0 1 0 0 0 0
  623. @TOC2@C HEADER FILE
  624.              61 1 16384 0 0 0 0 1 0 0 0 0
  625. @TOCPG2@27.00
  626.              62 0 16384 0 0 0 0 1 0 0 0 0
  627. @TOC2@MACROS
  628.              62 1 16384 0 0 0 0 1 0 0 0 0
  629. @TOCPG2@27.00
  630.              63 0 16384 0 0 0 0 1 0 0 0 0
  631. @TOC2@EXPORTED VARIABLES
  632.              63 1 16384 0 0 0 0 1 0 0 0 0
  633. @TOCPG2@27.00
  634.              64 0 16384 0 0 0 0 1 0 0 0 0
  635. @TOC2@EXPORTED FUNCTIONS
  636.              64 1 16384 0 0 0 0 1 0 0 0 0
  637. @TOCPG2@28.00
  638.              65 0 16384 0 0 0 0 1 0 0 0 0
  639. @TOC3@x_text_init
  640.              65 1 16384 0 0 0 0 1 0 0 0 0
  641. @TOCPG3@28.00
  642.              66 0 16384 0 0 0 0 1 0 0 0 0
  643. @TOC3@x_set_font
  644.              66 1 16384 0 0 0 0 1 0 0 0 0
  645. @TOCPG3@28.00
  646.              67 0 16384 0 0 0 0 1 0 0 0 0
  647. @TOC3@x_register_userfont
  648.              67 1 16384 0 0 0 0 1 0 0 0 0
  649. @TOCPG3@28.00
  650.              68 0 16384 0 0 0 0 1 0 0 0 0
  651. @TOC3@x_put_char
  652.              68 1 16384 0 0 0 0 1 0 0 0 0
  653. @TOCPG3@29.00
  654.              69 0 16384 0 0 0 0 1 0 0 0 0
  655. @TOC3@x_printf 
  656.              69 1 16384 0 0 0 0 1 0 0 0 0
  657. @TOCPG3@29.00
  658.              70 0 16384 0 0 0 0 1 0 0 0 0
  659. @TOC3@x_bgprintf
  660.              70 1 16384 0 0 0 0 1 0 0 0 0
  661. @TOCPG3@30.00
  662.              71 0 16384 0 0 0 0 1 0 0 0 0
  663. @TOC3@x_get_char_width
  664.              71 1 16384 0 0 0 0 1 0 0 0 0
  665. @TOCPG3@30.00
  666.              72 0 16384 0 0 0 0 1 0 0 0 0
  667. @TOC1@MODULE XPBITMAP
  668.              72 1 16384 0 0 0 0 1 0 0 0 0
  669. @TOCPG1@31.00
  670.              73 0 16384 0 0 0 0 1 0 0 0 0
  671. @TOC2@SOURCES
  672.              73 1 16384 0 0 0 0 1 0 0 0 0
  673. @TOCPG2@31.00
  674.              74 0 16384 0 0 0 0 1 0 0 0 0
  675. @TOC2@C HEADER FILE
  676.              74 1 16384 0 0 0 0 1 0 0 0 0
  677. @TOCPG2@31.00
  678.              75 0 16384 0 0 0 0 1 0 0 0 0
  679. @TOC2@EXPORTED FUNCTIONS
  680.              75 1 16384 0 0 0 0 1 0 0 0 0
  681. @TOCPG2@32.00
  682.              76 0 16384 0 0 0 0 1 0 0 0 0
  683. @TOC3@x_put_masked_pbm
  684.              76 1 16384 0 0 0 0 1 0 0 0 0
  685. @TOCPG3@32.00
  686.              77 0 16384 0 0 0 0 1 0 0 0 0
  687. @TOC3@x_put_pbm
  688.              77 1 16384 0 0 0 0 1 0 0 0 0
  689. @TOCPG3@32.00
  690.              78 0 16384 0 0 0 0 1 0 0 0 0
  691. @TOC3@x_get_pbm
  692.              78 1 16384 0 0 0 0 1 0 0 0 0
  693. @TOCPG3@33.00
  694.              79 0 16384 0 0 0 0 1 0 0 0 0
  695. @TOC1@MODULE XPBMCLIP
  696.              79 1 16384 0 0 0 0 1 0 0 0 0
  697. @TOCPG1@34.00
  698.              80 0 16384 0 0 0 0 1 0 0 0 0
  699. @TOC2@SOURCES
  700.              80 1 16384 0 0 0 0 1 0 0 0 0
  701. @TOCPG2@34.00
  702.              81 0 16384 0 0 0 0 1 0 0 0 0
  703. @TOC2@C HEADER FILE
  704.              81 1 16384 0 0 0 0 1 0 0 0 0
  705. @TOCPG2@34.00
  706.              82 0 16384 0 0 0 0 1 0 0 0 0
  707. @TOC2@EXPORTED FUNCTIONS
  708.              82 1 16384 0 0 0 0 1 0 0 0 0
  709. @TOCPG2@34.00
  710.              83 0 16384 0 0 0 0 1 0 0 0 0
  711. @TOC3@x_put_masked_pbm_clipx
  712.              83 1 16384 0 0 0 0 1 0 0 0 0
  713. @TOCPG3@35.00
  714.              84 0 16384 0 0 0 0 1 0 0 0 0
  715. @TOC3@x_put_masked_pbm_clipy
  716.              84 1 16384 0 0 0 0 1 0 0 0 0
  717. @TOCPG3@35.00
  718.              85 0 16384 0 0 0 0 1 0 0 0 0
  719. @TOC3@x_put_masked_pbm_clipxy
  720.              85 1 16384 0 0 0 0 1 0 0 0 0
  721. @TOCPG3@36.00
  722.              86 0 16384 0 0 0 0 1 0 0 0 0
  723. @TOC3@x_put_pbm_clipx
  724.              86 1 16384 0 0 0 0 1 0 0 0 0
  725. @TOCPG3@36.00
  726.              87 0 16384 0 0 0 0 1 0 0 0 0
  727. @TOC3@x_put_pbm_clipy
  728.              87 1 16384 0 0 0 0 1 0 0 0 0
  729. @TOCPG3@37.00
  730.              88 0 16384 0 0 0 0 1 0 0 0 0
  731. @TOC3@x_put_pbm_clipxy
  732.              88 1 16384 0 0 0 0 1 0 0 0 0
  733. @TOCPG3@37.00
  734.              89 0 16384 0 0 0 0 1 0 0 0 0
  735. @TOC1@MODULE  XCBITMAP
  736.              89 1 16384 0 0 0 0 1 0 0 0 0
  737. @TOCPG1@38.00
  738.              90 0 16384 0 0 0 0 1 0 0 0 0
  739. @TOC2@SOURCES
  740.              90 1 16384 0 0 0 0 1 0 0 0 0
  741. @TOCPG2@38.00
  742.              91 0 16384 0 0 0 0 1 0 0 0 0
  743. @TOC2@C HEADER FILE
  744.              91 1 16384 0 0 0 0 1 0 0 0 0
  745. @TOCPG2@38.00
  746.              92 0 16384 0 0 0 0 1 0 0 0 0
  747. @TOC2@EXPORTED FUNCTIONS
  748.              92 1 16384 0 0 0 0 1 0 0 0 0
  749. @TOCPG2@39.00
  750.              93 0 16384 0 0 0 0 1 0 0 0 0
  751. @TOC3@x_compile_bitmap
  752.              93 1 16384 0 0 0 0 1 0 0 0 0
  753. @TOCPG3@39.00
  754.              94 0 16384 0 0 0 0 1 0 0 0 0
  755. @TOC3@x_sizeof_cbitmap
  756.              94 1 16384 0 0 0 0 1 0 0 0 0
  757. @TOCPG3@39.00
  758.              95 0 16384 0 0 0 0 1 0 0 0 0
  759. @TOC3@x_put_cbitmap
  760.              95 1 16384 0 0 0 0 1 0 0 0 0
  761. @TOCPG3@39.00
  762.              96 0 16384 0 0 0 0 1 0 0 0 0
  763. @TOC1@MODULE XCOMPPBM
  764.              96 1 16384 0 0 0 0 1 0 0 0 0
  765. @TOCPG1@40.00
  766.              97 0 16384 0 0 0 0 1 0 0 0 0
  767. @TOC2@SOURCES
  768.              97 1 16384 0 0 0 0 1 0 0 0 0
  769. @TOCPG2@40.00
  770.              98 0 16384 0 0 0 0 1 0 0 0 0
  771. @TOC2@C HEADER FILE
  772.              98 1 16384 0 0 0 0 1 0 0 0 0
  773. @TOCPG2@40.00
  774.              149 0 16384 0 0 0 0 1 0 0 0 0
  775. @TOC2@EXPORTED VARIABLES
  776.              149 1 16384 0 0 0 0 1 0 0 0 0
  777. @TOCPG2@60.00
  778.              99 0 16384 0 0 0 0 1 0 0 0 0
  779. @TOC2@EXPORTED FUNCTIONS
  780.              99 1 16384 0 0 0 0 1 0 0 0 0
  781. @TOCPG2@41.00
  782.              100 0 16384 0 0 0 0 1 0 0 0 0
  783. @TOC3@x_compile_pbm
  784.              100 1 16384 0 0 0 0 1 0 0 0 0
  785. @TOCPG3@41.00
  786.              101 0 16384 0 0 0 0 1 0 0 0 0
  787. @TOC3@x_sizeof_cpbm
  788.              101 1 16384 0 0 0 0 1 0 0 0 0
  789. @TOCPG3@41.00
  790.              102 0 16384 0 0 0 0 1 0 0 0 0
  791. @TOC1@MODULE XVBITMAP
  792.              102 1 16384 0 0 0 0 1 0 0 0 0
  793. @TOCPG1@42.00
  794.              103 0 16384 0 0 0 0 1 0 0 0 0
  795. @TOC2@SOURCES
  796.              103 1 16384 0 0 0 0 1 0 0 0 0
  797. @TOCPG2@43.00
  798.              104 0 16384 0 0 0 0 1 0 0 0 0
  799. @TOC2@C HEADER FILE
  800.              104 1 16384 0 0 0 0 1 0 0 0 0
  801. @TOCPG2@43.00
  802.              105 0 16384 0 0 0 0 1 0 0 0 0
  803. @TOC2@EXPORTED FUNCTIONS
  804.              105 1 16384 0 0 0 0 1 0 0 0 0
  805. @TOCPG2@44.00
  806.              106 0 16384 0 0 0 0 1 0 0 0 0
  807. @TOC3@x_make_vbm
  808.              106 1 16384 0 0 0 0 1 0 0 0 0
  809. @TOCPG3@44.00
  810.              107 0 16384 0 0 0 0 1 0 0 0 0
  811. @TOC3@x_put_masked_vbm
  812.              107 1 16384 0 0 0 0 1 0 0 0 0
  813. @TOCPG3@44.00
  814.              108 0 16384 0 0 0 0 1 0 0 0 0
  815. @TOC3@x_put_masked_vbm_clipx
  816.              108 1 16384 0 0 0 0 1 0 0 0 0
  817. @TOCPG3@45.00
  818.              109 0 16384 0 0 0 0 1 0 0 0 0
  819. @TOC3@x_put_masked_vbm_clipy
  820.              109 1 16384 0 0 0 0 1 0 0 0 0
  821. @TOCPG3@45.00
  822.              110 0 16384 0 0 0 0 1 0 0 0 0
  823. @TOC3@x_put_masked_vbm_clipxy
  824.              110 1 16384 0 0 0 0 1 0 0 0 0
  825. @TOCPG3@46.00
  826.              111 0 16384 0 0 0 0 1 0 0 0 0
  827. @TOC1@MODULE  XMOUSE
  828.              111 1 16384 0 0 0 0 1 0 0 0 0
  829. @TOCPG1@47.00
  830.              112 0 16384 0 0 0 0 1 0 0 0 0
  831. @TOC2@MS Mouse Driver Functions
  832.              112 1 16384 0 0 0 0 1 0 0 0 0
  833. @TOCPG2@47.00
  834.              113 0 16384 0 0 0 0 1 0 0 0 0
  835. @TOC2@SOURCES
  836.              113 1 16384 0 0 0 0 1 0 0 0 0
  837. @TOCPG2@48.00
  838.              114 0 16384 0 0 0 0 1 0 0 0 0
  839. @TOC2@C HEADER FILE
  840.              114 1 16384 0 0 0 0 1 0 0 0 0
  841. @TOCPG2@48.00
  842.              115 0 16384 0 0 0 0 1 0 0 0 0
  843. @TOC2@EXPORTED VARIABLES
  844.              115 1 16384 0 0 0 0 1 0 0 0 0
  845. @TOCPG2@48.00
  846.              116 0 16384 0 0 0 0 1 0 0 0 0
  847. @TOC2@EXPORTED FUNCTIONS
  848.              116 1 16384 0 0 0 0 1 0 0 0 0
  849. @TOCPG2@49.00
  850.              117 0 16384 0 0 0 0 1 0 0 0 0
  851. @TOC3@x_mouse_init
  852.              117 1 16384 0 0 0 0 1 0 0 0 0
  853. @TOCPG3@49.00
  854.              118 0 16384 0 0 0 0 1 0 0 0 0
  855. @TOC3@x_define_mouse_cursor
  856.              118 1 16384 0 0 0 0 1 0 0 0 0
  857. @TOCPG3@49.00
  858.              119 0 16384 0 0 0 0 1 0 0 0 0
  859. @TOC3@x_show_mouse
  860.              119 1 16384 0 0 0 0 1 0 0 0 0
  861. @TOCPG3@50.00
  862.              120 0 16384 0 0 0 0 1 0 0 0 0
  863. @TOC3@x_hide_mouse
  864.              120 1 16384 0 0 0 0 1 0 0 0 0
  865. @TOCPG3@50.00
  866.              121 0 16384 0 0 0 0 1 0 0 0 0
  867. @TOC3@x_mouse_remove
  868.              121 1 16384 0 0 0 0 1 0 0 0 0
  869. @TOCPG3@50.00
  870.              122 0 16384 0 0 0 0 1 0 0 0 0
  871. @TOC3@x_position_mouse
  872.              122 1 16384 0 0 0 0 1 0 0 0 0
  873. @TOCPG3@50.00
  874.              123 0 16384 0 0 0 0 1 0 0 0 0
  875. @TOC3@x_mouse_window
  876.              123 1 16384 0 0 0 0 1 0 0 0 0
  877. @TOCPG3@50.00
  878.              124 0 16384 0 0 0 0 1 0 0 0 0
  879. @TOC3@x_update_mouse
  880.              124 1 16384 0 0 0 0 1 0 0 0 0
  881. @TOCPG3@51.00
  882.              125 0 16384 0 0 0 0 1 0 0 0 0
  883. @TOC1@MODULE XBMTOOLS
  884.              125 1 16384 0 0 0 0 1 0 0 0 0
  885. @TOCPG1@52.00
  886.              126 0 16384 0 0 0 0 1 0 0 0 0
  887. @TOC2@SOURCES
  888.              126 1 16384 0 0 0 0 1 0 0 0 0
  889. @TOCPG2@52.00
  890.              127 0 16384 0 0 0 0 1 0 0 0 0
  891. @TOC2@C HEADER FILE
  892.              127 1 16384 0 0 0 0 1 0 0 0 0
  893. @TOCPG2@52.00
  894.              128 0 16384 0 0 0 0 1 0 0 0 0
  895. @TOC2@MACROS
  896.              128 1 16384 0 0 0 0 1 0 0 0 0
  897. @TOCPG2@53.00
  898.              129 0 16384 0 0 0 0 1 0 0 0 0
  899. @TOC2@EXPORT FUNCTIONS
  900.              129 1 16384 0 0 0 0 1 0 0 0 0
  901. @TOCPG2@54.00
  902.              130 0 16384 0 0 0 0 1 0 0 0 0
  903. @TOC3@x_pbm_to_bm
  904.              130 1 16384 0 0 0 0 1 0 0 0 0
  905. @TOCPG3@54.00
  906.              131 0 16384 0 0 0 0 1 0 0 0 0
  907. @TOC3@x_bm_to_pbm
  908.              131 1 16384 0 0 0 0 1 0 0 0 0
  909. @TOCPG3@54.00
  910.              132 0 16384 0 0 0 0 1 0 0 0 0
  911. @TOC1@MODULE  XCLIPPBM
  912.              132 1 16384 0 0 0 0 1 0 0 0 0
  913. @TOCPG1@55.00
  914.              133 0 16384 0 0 0 0 1 0 0 0 0
  915. @TOC2@SOURCES
  916.              133 1 16384 0 0 0 0 1 0 0 0 0
  917. @TOCPG2@55.00
  918.              134 0 16384 0 0 0 0 1 0 0 0 0
  919. @TOC2@C HEADER FILE
  920.              134 1 16384 0 0 0 0 1 0 0 0 0
  921. @TOCPG2@55.00
  922.              135 0 16384 0 0 0 0 1 0 0 0 0
  923. @TOC2@EXPORTED VARIABLES
  924.              135 1 16384 0 0 0 0 1 0 0 0 0
  925. @TOCPG2@55.00
  926.              136 0 16384 0 0 0 0 1 0 0 0 0
  927. @TOC2@EXPORTED FUNCTIONS
  928.              136 1 16384 0 0 0 0 1 0 0 0 0
  929. @TOCPG2@56.00
  930.              137 0 16384 0 0 0 0 1 0 0 0 0
  931. @TOC3@x_clip_pbm
  932.              137 1 16384 0 0 0 0 1 0 0 0 0
  933. @TOCPG3@56.00
  934.              138 0 16384 0 0 0 0 1 0 0 0 0
  935. @TOC3@x_clip_masked_pbm
  936.              138 1 16384 0 0 0 0 1 0 0 0 0
  937. @TOCPG3@56.00
  938.              139 0 16384 0 0 0 0 1 0 0 0 0
  939. @TOC1@MODULE  XCIRCLE
  940.              139 1 16384 0 0 0 0 1 0 0 0 0
  941. @TOCPG1@57.00
  942.              140 0 16384 0 0 0 0 1 0 0 0 0
  943. @TOC2@SOURCES
  944.              140 1 16384 0 0 0 0 1 0 0 0 0
  945. @TOCPG2@57.00
  946.              141 0 16384 0 0 0 0 1 0 0 0 0
  947. @TOC2@C HEADER FILE
  948.              141 1 16384 0 0 0 0 1 0 0 0 0
  949. @TOCPG2@57.00
  950.              142 0 16384 0 0 0 0 1 0 0 0 0
  951. @TOC2@EXPORTED FUNCTIONS
  952.              142 1 16384 0 0 0 0 1 0 0 0 0
  953. @TOCPG2@58.00
  954.              143 0 16384 0 0 0 0 1 0 0 0 0
  955. @TOC3@x_circle
  956.              143 1 16384 0 0 0 0 1 0 0 0 0
  957. @TOCPG3@58.00
  958.              144 0 16384 0 0 0 0 1 0 0 0 0
  959. @TOC3@x_filled_circle
  960.              144 1 16384 0 0 0 0 1 0 0 0 0
  961. @TOCPG3@58.00
  962.              145 0 16384 0 0 0 0 1 0 0 0 0
  963. @TOC1@MODULE XDETECT
  964.              145 1 16384 0 0 0 0 1 0 0 0 0
  965. @TOCPG1@59.00
  966.              146 0 16384 0 0 0 0 1 0 0 0 0
  967. @TOC2@SOURCES
  968.              146 1 16384 0 0 0 0 1 0 0 0 0
  969. @TOCPG2@59.00
  970.              147 0 16384 0 0 0 0 1 0 0 0 0
  971. @TOC2@C HEADER FILE
  972.              147 1 16384 0 0 0 0 1 0 0 0 0
  973. @TOCPG2@59.00
  974.              148 0 16384 0 0 0 0 1 0 0 0 0
  975. @TOC2@EXPORTED MACROS
  976.              148 1 16384 0 0 0 0 1 0 0 0 0
  977. @TOCPG2@59.00
  978.              150 0 16384 0 0 0 0 1 0 0 0 0
  979. @TOC2@EXPORTED FUNCTIONS
  980.              150 1 16384 0 0 0 0 1 0 0 0 0
  981. @TOCPG2@61.00
  982.              151 0 16384 0 0 0 0 1 0 0 0 0
  983. @TOC3@x_graphics_card
  984.              151 1 16384 0 0 0 0 1 0 0 0 0
  985. @TOCPG3@61.00
  986.              152 0 16384 0 0 0 0 1 0 0 0 0
  987. @TOC3@x_processor
  988.              152 1 16384 0 0 0 0 1 0 0 0 0
  989. @TOCPG3@61.00
  990.              153 0 16384 0 0 0 0 1 0 0 0 0
  991. @TOC3@x_coprocessor
  992.              153 1 16384 0 0 0 0 1 0 0 0 0
  993. @TOCPG3@61.00
  994.              154 0 16384 0 0 0 0 1 0 0 0 0
  995. @TOC3@x_mousedriver
  996.              154 1 16384 0 0 0 0 1 0 0 0 0
  997. @TOCPG3@61.00
  998.              155 0 16384 0 0 0 0 1 0 0 0 0
  999. @TOC1@MODULE XFILEIO
  1000.              155 1 16384 0 0 0 0 1 0 0 0 0
  1001. @TOCPG1@62.00
  1002.              156 0 16384 0 0 0 0 1 0 0 0 0
  1003. @TOC2@SOURCES
  1004.              156 1 16384 0 0 0 0 1 0 0 0 0
  1005. @TOCPG2@62.00
  1006.              157 0 16384 0 0 0 0 1 0 0 0 0
  1007. @TOC2@C HEADER FILE
  1008.              157 1 16384 0 0 0 0 1 0 0 0 0
  1009. @TOCPG2@62.00
  1010.              158 0 16384 0 0 0 0 1 0 0 0 0
  1011. @TOC2@EXPORTED MACROS
  1012.              158 1 16384 0 0 0 0 1 0 0 0 0
  1013. @TOCPG2@62.00
  1014.              159 0 16384 0 0 0 0 1 0 0 0 0
  1015. @TOC2@EXPORTED FUNCTIONS
  1016.              159 1 16384 0 0 0 0 1 0 0 0 0
  1017. @TOCPG2@63.00
  1018.              160 0 16384 0 0 0 0 1 0 0 0 0
  1019. @TOC3@f_open
  1020.              160 1 16384 0 0 0 0 1 0 0 0 0
  1021. @TOCPG3@63.00
  1022.              161 0 16384 0 0 0 0 1 0 0 0 0
  1023. @TOC3@f_close
  1024.              161 1 16384 0 0 0 0 1 0 0 0 0
  1025. @TOCPG3@63.00
  1026.              162 0 16384 0 0 0 0 1 0 0 0 0
  1027. @TOC3@f_read
  1028.              162 1 16384 0 0 0 0 1 0 0 0 0
  1029. @TOCPG3@63.00
  1030.              163 0 16384 0 0 0 0 1 0 0 0 0
  1031. @TOC3@f_readfar
  1032.              163 1 16384 0 0 0 0 1 0 0 0 0
  1033. @TOCPG3@64.00
  1034.              164 0 16384 0 0 0 0 1 0 0 0 0
  1035. @TOC3@f_write
  1036.              164 1 16384 0 0 0 0 1 0 0 0 0
  1037. @TOCPG3@64.00
  1038.              165 0 16384 0 0 0 0 1 0 0 0 0
  1039. @TOC3@f_writefar
  1040.              165 1 16384 0 0 0 0 1 0 0 0 0
  1041. @TOCPG3@64.00
  1042.              166 0 16384 0 0 0 0 1 0 0 0 0
  1043. @TOC3@f_seek
  1044.              166 1 16384 0 0 0 0 1 0 0 0 0
  1045. @TOCPG3@65.00
  1046.              167 0 16384 0 0 0 0 1 0 0 0 0
  1047. @TOC3@f_filelength
  1048.              167 1 16384 0 0 0 0 1 0 0 0 0
  1049. @TOCPG3@65.00
  1050.              168 0 16384 0 0 0 0 1 0 0 0 0
  1051. @TOC3@f_tell
  1052.              168 1 16384 0 0 0 0 1 0 0 0 0
  1053. @TOCPG3@65.00
  1054.              169 0 16384 0 0 0 0 1 0 0 0 0
  1055. @TOC1@MODULE XRLETOOL
  1056.              169 1 16384 0 0 0 0 1 0 0 0 0
  1057. @TOCPG1@66.00
  1058.              170 0 16384 0 0 0 0 1 0 0 0 0
  1059. @TOC2@SOURCES
  1060.              170 1 16384 0 0 0 0 1 0 0 0 0
  1061. @TOCPG2@66.00
  1062.              171 0 16384 0 0 0 0 1 0 0 0 0
  1063. @TOC2@C HEADER FILE
  1064.              171 1 16384 0 0 0 0 1 0 0 0 0
  1065. @TOCPG2@66.00
  1066.              172 0 16384 0 0 0 0 1 0 0 0 0
  1067. @TOC2@EXPORTED FUNCTIONS
  1068.              172 1 16384 0 0 0 0 1 0 0 0 0
  1069. @TOCPG2@67.00
  1070.              173 0 16384 0 0 0 0 1 0 0 0 0
  1071. @TOC3@x_buff_RLDecode
  1072.              173 1 16384 0 0 0 0 1 0 0 0 0
  1073. @TOCPG3@67.00
  1074.              174 0 16384 0 0 0 0 1 0 0 0 0
  1075. @TOC3@x_buff_RLEncode
  1076.              174 1 16384 0 0 0 0 1 0 0 0 0
  1077. @TOCPG3@67.00
  1078.              175 0 16384 0 0 0 0 1 0 0 0 0
  1079. @TOC3@x_buff_RLE_size
  1080.              175 1 16384 0 0 0 0 1 0 0 0 0
  1081. @TOCPG3@67.00
  1082.              176 0 16384 0 0 0 0 1 0 0 0 0
  1083. @TOC3@x_file_RLEncode
  1084.              176 1 16384 0 0 0 0 1 0 0 0 0
  1085. @TOCPG3@68.00
  1086.              177 0 16384 0 0 0 0 1 0 0 0 0
  1087. @TOC3@x_file_RLDecode
  1088.              177 1 16384 0 0 0 0 1 0 0 0 0
  1089. @TOCPG3@68.00
  1090.              178 0 16384 0 0 0 0 1 0 0 0 0
  1091. @TOC1@MODULE XPOLYGON
  1092.              178 1 16384 0 0 0 0 1 0 0 0 0
  1093. @TOCPG1@69.00
  1094.              179 0 16384 0 0 0 0 1 0 0 0 0
  1095. @TOC2@SOURCES
  1096.              179 1 16384 0 0 0 0 1 0 0 0 0
  1097. @TOCPG2@69.00
  1098.              180 0 16384 0 0 0 0 1 0 0 0 0
  1099. @TOC2@C HEADER FILE
  1100.              180 1 16384 0 0 0 0 1 0 0 0 0
  1101. @TOCPG2@69.00
  1102.              181 0 16384 0 0 0 0 1 0 0 0 0
  1103. @TOC2@TYPE DEFS
  1104.              181 1 16384 0 0 0 0 1 0 0 0 0
  1105. @TOCPG2@69.00
  1106.              182 0 16384 0 0 0 0 1 0 0 0 0
  1107. @TOC2@EXPORTED FUNCTIONS
  1108.              182 1 16384 0 0 0 0 1 0 0 0 0
  1109. @TOCPG2@70.00
  1110.              183 0 16384 0 0 0 0 1 0 0 0 0
  1111. @TOC3@x_triangle
  1112.              183 1 16384 0 0 0 0 1 0 0 0 0
  1113. @TOCPG3@70.00
  1114.              184 0 16384 0 0 0 0 1 0 0 0 0
  1115. @TOC3@x_polygon
  1116.              184 1 16384 0 0 0 0 1 0 0 0 0
  1117. @TOCPG3@71.00
  1118.              185 0 16384 0 0 0 0 1 0 0 0 0
  1119. @TOC1@MODULE XBEZIER
  1120.              185 1 16384 0 0 0 0 1 0 0 0 0
  1121. @TOCPG1@71.00
  1122.              186 0 16384 0 0 0 0 1 0 0 0 0
  1123. @TOC2@SOURCES
  1124.              186 1 16384 0 0 0 0 1 0 0 0 0
  1125. @TOCPG2@72.00
  1126.              187 0 16384 0 0 0 0 1 0 0 0 0
  1127. @TOC2@C HEADER FILE
  1128.              187 1 16384 0 0 0 0 1 0 0 0 0
  1129. @TOCPG2@72.00
  1130.              188 0 16384 0 0 0 0 1 0 0 0 0
  1131. @TOC2@EXPORTED FUNCTIONS
  1132.              188 1 16384 0 0 0 0 1 0 0 0 0
  1133. @TOCPG2@73.00
  1134.              189 0 16384 0 0 0 0 1 0 0 0 0
  1135. @TOC3@x_bezier
  1136.              189 1 16384 0 0 0 0 1 0 0 0 0
  1137. @TOCPG3@73.00
  1138.              190 0 16384 0 0 0 0 1 0 0 0 0
  1139. @TOC1@MODULE XFILL
  1140.              190 1 16384 0 0 0 0 1 0 0 0 0
  1141. @TOCPG1@74.00
  1142.              191 0 16384 0 0 0 0 1 0 0 0 0
  1143. @TOC2@SOURCES
  1144.              191 1 16384 0 0 0 0 1 0 0 0 0
  1145. @TOCPG2@74.00
  1146.              192 0 16384 0 0 0 0 1 0 0 0 0
  1147. @TOC2@C HEADER FILE
  1148.              192 1 16384 0 0 0 0 1 0 0 0 0
  1149. @TOCPG2@74.00
  1150.              193 0 16384 0 0 0 0 1 0 0 0 0
  1151. @TOC2@EXPORTED FUNCTIONS
  1152.              193 1 16384 0 0 0 0 1 0 0 0 0
  1153. @TOCPG2@75.00
  1154.              194 0 16384 0 0 0 0 1 0 0 0 0
  1155. @TOC3@x_flood_fill
  1156.              194 1 16400 0 0 0 0 1 0 0 0 0
  1157. @TOCPG3@<+A>75.00
  1158.              195 0 16384 0 0 0 0 1 0 0 0 0
  1159. @TOC3@x_boundry_fill
  1160.              195 1 16400 0 0 0 0 1 0 0 0 0
  1161. @TOCPG3@<+A>75.00
  1162.              196 0 16384 0 0 0 0 1 0 0 0 0
  1163. @TOC1@MODULE XVSYNC
  1164.              196 1 16400 0 0 0 0 1 0 0 0 0
  1165. @TOCPG1@<+A>76.00
  1166.              197 0 16384 0 0 0 0 1 0 0 0 0
  1167. @TOC2@SOURCES
  1168.              197 1 16400 0 0 0 0 1 0 0 0 0
  1169. @TOCPG2@<+A>76.00
  1170.              198 0 16384 0 0 0 0 1 0 0 0 0
  1171. @TOC2@C HEADER FILE
  1172.              198 1 16400 0 0 0 0 1 0 0 0 0
  1173. @TOCPG2@<+A>76.00
  1174.              199 0 16384 0 0 0 0 1 0 0 0 0
  1175. @TOC2@EXPORTED VARIABLES
  1176.              199 1 16400 0 0 0 0 1 0 0 0 0
  1177. @TOCPG2@<+A>77.00
  1178.              200 0 16384 0 0 0 0 1 0 0 0 0
  1179. @TOC2@EXPORTED FUNCTIONS
  1180.              200 1 16400 0 0 0 0 1 0 0 0 0
  1181. @TOCPG2@<+A>78.00
  1182.              201 0 16384 0 0 0 0 1 0 0 0 0
  1183. @TOC3@x_install_vsync_handler
  1184.              201 1 16400 0 0 0 0 1 0 0 0 0
  1185. @TOCPG3@<+A>78.00
  1186.              202 0 16384 0 0 0 0 1 0 0 0 0
  1187. @TOC3@x_remove_vsync_handler
  1188.              202 1 16400 0 0 0 0 1 0 0 0 0
  1189. @TOCPG3@<+A>78.00
  1190.              203 0 16384 0 0 0 0 1 0 0 0 0
  1191. @TOC3@x_set_user_vsync_handler
  1192.              203 1 16400 0 0 0 0 1 0 0 0 0
  1193. @TOCPG3@<+A>78.00
  1194.              204 0 16384 0 0 0 0 1 0 0 0 0
  1195. @TOC3@x_wait_start_addr
  1196.              204 1 16400 0 0 0 0 1 0 0 0 0
  1197. @TOCPG3@<+A>79.00
  1198.              205 0 16384 0 0 0 0 1 0 0 0 0
  1199. @TOC1@MODULE XCBITM32
  1200.              205 1 16400 0 0 0 0 1 0 0 0 0
  1201. @TOCPG1@<+A>79.00
  1202.              206 0 16384 0 0 0 0 1 0 0 0 0
  1203. @TOC2@SOURCES
  1204.              206 1 16400 0 0 0 0 1 0 0 0 0
  1205. @TOCPG2@<+A>80.00
  1206.              207 0 16384 0 0 0 0 1 0 0 0 0
  1207. @TOC2@C HEADER FILE
  1208.              207 1 16400 0 0 0 0 1 0 0 0 0
  1209. @TOCPG2@<+A>80.00
  1210.              208 0 16384 0 0 0 0 1 0 0 0 0
  1211. @TOC2@EXPORTED FUNCTIONS
  1212.              208 1 16400 0 0 0 0 1 0 0 0 0
  1213. @TOCPG2@<+A>81.00
  1214.              209 0 16384 0 0 0 0 1 0 0 0 0
  1215. @TOC3@x_compile_bitmap_32
  1216.              209 1 16400 0 0 0 0 1 0 0 0 0
  1217. @TOCPG3@<+A>81.00
  1218.              210 0 16384 0 0 0 0 1 0 0 0 0
  1219. @TOC3@x_sizeof_cpbm
  1220.              210 1 16400 0 0 0 0 1 0 0 0 0
  1221. @TOCPG3@<+A>81.00
  1222.              211 0 16384 0 0 0 0 1 0 0 0 0
  1223. @TOC1@REFERENCE SECTION
  1224.              211 1 16400 0 0 0 0 1 0 0 0 0
  1225. @TOCPG1@<+A>82.00
  1226.              212 0 16384 0 0 0 0 1 0 0 0 0
  1227. @TOC2@REFERENCES
  1228.              212 1 16400 0 0 0 0 1 0 0 0 0
  1229. @TOCPG2@<+A>82.00
  1230.              213 0 16384 0 0 0 0 1 0 0 0 0
  1231. @TOC2@WHAT IS MODE X ?
  1232.              213 1 16400 0 0 0 0 1 0 0 0 0
  1233. @TOCPG2@<+A>82.00
  1234.              214 0 16384 0 0 0 0 1 0 0 0 0
  1235. @TOC2@WHAT IS A SPLIT SCREEN ?
  1236.              214 1 16400 0 0 0 0 1 0 0 0 0
  1237. @TOCPG2@<+A>82.00
  1238.              215 0 16384 0 0 0 0 1 0 0 0 0
  1239. @TOC2@WHAT IS RLE?
  1240.              215 1 16400 0 0 0 0 1 0 0 0 0
  1241. @TOCPG2@<+A>83.00
  1242.              216 0 16384 0 0 0 0 1 0 0 0 0
  1243. @TOC2@WHAT IS DOUBLE BUFFERING ?
  1244.              216 1 16400 0 0 0 0 1 0 0 0 0
  1245. @TOCPG2@<+A>84.00
  1246.              217 0 16384 0 0 0 0 1 0 0 0 0
  1247. @TOC2@WHAT IS TRIPLE BUFFERING?
  1248.              217 1 16400 0 0 0 0 1 0 0 0 0
  1249. @TOCPG2@<+A>84.00
  1250.              218 0 16384 0 0 0 0 1 0 0 0 0
  1251. @TOC2@WHAT IS A BEZIER CURVE?
  1252.              218 1 16400 0 0 0 0 1 0 0 0 0
  1253. @TOCPG2@<+A>84.00
  1254.              219 0 16384 0 0 0 0 1 0 0 0 0
  1255. @TOC2@The Care and Feeding of Compiled Masked Blits
  1256.              219 1 16400 0 0 0 0 1 0 0 0 0
  1257. @TOCPG2@<+A>85.00
  1258.              220 0 16384 0 0 0 0 1 0 0 0 0
  1259. @TOC2@Blits and Pieces
  1260.              220 1 16400 0 0 0 0 1 0 0 0 0
  1261. @TOCPG2@<+A>87.00
  1262.              221 0 16384 0 0 0 0 1 0 0 0 0
  1263. @TOC2@Wheel Have to See About That
  1264.              221 1 16400 0 0 0 0 1 0 0 0 0
  1265. @TOCPG2@<+A>88.00
  1266.              0 0 16384 0 0 0 0 1 0 0 0 0
  1267. @TOC1@INTRODUCTION
  1268.              0 1 16384 0 0 0 0 1 0 0 0 0
  1269. @TOCPG1@1.00
  1270.              1 0 16384 0 0 0 0 1 0 0 0 0
  1271. @TOC2@EDITORS NOTE
  1272.              1 1 16384 0 0 0 0 1 0 0 0 0
  1273. @TOCPG2@1.00
  1274.              2 0 16384 0 0 0 0 1 0 0 0 0
  1275. @TOC2@CONTACTING THE AUTHORS
  1276.              2 1 16384 0 0 0 0 1 0 0 0 0
  1277. @TOCPG2@1.00
  1278.              3 0 16384 0 0 0 0 1 0 0 0 0
  1279. @TOC2@DISCLAIMER
  1280.              3 1 16384 0 0 0 0 1 0 0 0 0
  1281. @TOCPG2@1.00
  1282.              4 0 16384 0 0 0 0 1 0 0 0 0
  1283. @TOC2@ABOUT XLIB
  1284.              4 1 16384 0 0 0 0 1 0 0 0 0
  1285. @TOCPG2@1.00
  1286.              5 0 16384 0 0 0 0 1 0 0 0 0
  1287. @TOC2@GENERAL FEATURES
  1288.              5 1 16384 0 0 0 0 1 0 0 0 0
  1289. @TOCPG2@2.00
  1290.              6 0 16384 0 0 0 0 1 0 0 0 0
  1291. @TOC2@MODULES COMPRISING XLIB
  1292.              6 1 16384 0 0 0 0 1 0 0 0 0
  1293. @TOCPG2@2.00
  1294.              7 0 16384 0 0 0 0 1 0 0 0 0
  1295. @TOC2@GLOBAL DEFINES
  1296.              7 1 16384 0 0 0 0 1 0 0 0 0
  1297. @TOCPG2@3.00
  1298.              8 0 16384 0 0 0 0 1 0 0 0 0
  1299. @TOC1@MODULE XMAIN
  1300.              8 1 16384 0 0 0 0 1 0 0 0 0
  1301. @TOCPG1@4.00
  1302.              9 0 16384 0 0 0 0 1 0 0 0 0
  1303. @TOC2@SOURCES
  1304.              9 1 16384 0 0 0 0 1 0 0 0 0
  1305. @TOCPG2@4.00
  1306.              10 0 16384 0 0 0 0 1 0 0 0 0
  1307. @TOC2@C HEADER FILE
  1308.              10 1 16384 0 0 0 0 1 0 0 0 0
  1309. @TOCPG2@4.00
  1310.              11 0 16384 0 0 0 0 1 0 0 0 0
  1311. @TOC2@EXPORTED VARIABLES
  1312.              11 1 16384 0 0 0 0 1 0 0 0 0
  1313. @TOCPG2@4.00
  1314.              12 0 16384 0 0 0 0 1 0 0 0 0
  1315. @TOC2@EXPORTED FUNCTIONS
  1316.              12 1 16384 0 0 0 0 1 0 0 0 0
  1317. @TOCPG2@7.00
  1318.              13 0 16384 0 0 0 0 1 0 0 0 0
  1319. @TOC3@x_set_mode
  1320.              13 1 16384 0 0 0 0 1 0 0 0 0
  1321. @TOCPG3@7.00
  1322.              14 0 16384 0 0 0 0 1 0 0 0 0
  1323. @TOC3@x_select_default_plane
  1324.              14 1 16384 0 0 0 0 1 0 0 0 0
  1325. @TOCPG3@7.00
  1326.              15 0 16384 0 0 0 0 1 0 0 0 0
  1327. @TOC3@x_set_splitscreen
  1328.              15 1 16384 0 0 0 0 1 0 0 0 0
  1329. @TOCPG3@8.00
  1330.              16 0 16384 0 0 0 0 1 0 0 0 0
  1331. @TOC3@x_set_doublebuffer
  1332.              16 1 16384 0 0 0 0 1 0 0 0 0
  1333. @TOCPG3@9.00
  1334.              17 0 16384 0 0 0 0 1 0 0 0 0
  1335. @TOC3@x_hide_splitscreen
  1336.              17 1 16384 0 0 0 0 1 0 0 0 0
  1337. @TOCPG3@10.00
  1338.              18 0 16384 0 0 0 0 1 0 0 0 0
  1339. @TOC3@x_show_splitscreen
  1340.              18 1 16384 0 0 0 0 1 0 0 0 0
  1341. @TOCPG3@11.00
  1342.              19 0 16384 0 0 0 0 1 0 0 0 0
  1343. @TOC3@x_adjust_splitscreen
  1344.              19 1 16384 0 0 0 0 1 0 0 0 0
  1345. @TOCPG3@11.00
  1346.              20 0 16384 0 0 0 0 1 0 0 0 0
  1347. @TOC3@x_set_start_addr
  1348.              20 1 16384 0 0 0 0 1 0 0 0 0
  1349. @TOCPG3@11.00
  1350.              21 0 16384 0 0 0 0 1 0 0 0 0
  1351. @TOC3@x_page_flip
  1352.              21 1 16384 0 0 0 0 1 0 0 0 0
  1353. @TOCPG3@12.00
  1354.              22 0 16384 0 0 0 0 1 0 0 0 0
  1355. @TOC3@x_text_mode
  1356.              22 1 16384 0 0 0 0 1 0 0 0 0
  1357. @TOCPG3@12.00
  1358.              23 0 16384 0 0 0 0 1 0 0 0 0
  1359. @TOC3@x_set_cliprect
  1360.              23 1 16384 0 0 0 0 1 0 0 0 0
  1361. @TOCPG3@12.00
  1362.              24 0 16384 0 0 0 0 1 0 0 0 0
  1363. @TOC1@MODULE XPOINT
  1364.              24 1 16384 0 0 0 0 1 0 0 0 0
  1365. @TOCPG1@13.00
  1366.              25 0 16384 0 0 0 0 1 0 0 0 0
  1367. @TOC2@SOURCES
  1368.              25 1 16384 0 0 0 0 1 0 0 0 0
  1369. @TOCPG2@13.00
  1370.              26 0 16384 0 0 0 0 1 0 0 0 0
  1371. @TOC2@C HEADER FILE
  1372.              26 1 16384 0 0 0 0 1 0 0 0 0
  1373. @TOCPG2@13.00
  1374.              27 0 16384 0 0 0 0 1 0 0 0 0
  1375. @TOC2@EXPORTED FUNCTIONS
  1376.              27 1 16384 0 0 0 0 1 0 0 0 0
  1377. @TOCPG2@14.00
  1378.              28 0 16384 0 0 0 0 1 0 0 0 0
  1379. @TOC3@x_put_pix
  1380.              28 1 16384 0 0 0 0 1 0 0 0 0
  1381. @TOCPG3@14.00
  1382.              29 0 16384 0 0 0 0 1 0 0 0 0
  1383. @TOC3@x_get_pix
  1384.              29 1 16384 0 0 0 0 1 0 0 0 0
  1385. @TOCPG3@14.00
  1386.              30 0 16384 0 0 0 0 1 0 0 0 0
  1387. @TOC1@MODULE XRECT
  1388.              30 1 16384 0 0 0 0 1 0 0 0 0
  1389. @TOCPG1@15.00
  1390.              31 0 16384 0 0 0 0 1 0 0 0 0
  1391. @TOC2@SOURCES
  1392.              31 1 16384 0 0 0 0 1 0 0 0 0
  1393. @TOCPG2@15.00
  1394.              32 0 16384 0 0 0 0 1 0 0 0 0
  1395. @TOC2@C HEADER FILE
  1396.              32 1 16384 0 0 0 0 1 0 0 0 0
  1397. @TOCPG2@15.00
  1398.              33 0 16384 0 0 0 0 1 0 0 0 0
  1399. @TOC2@EXPORTED FUNCTIONS
  1400.              33 1 16384 0 0 0 0 1 0 0 0 0
  1401. @TOCPG2@16.00
  1402.              34 0 16384 0 0 0 0 1 0 0 0 0
  1403. @TOC3@x_rect_pattern
  1404.              34 1 16384 0 0 0 0 1 0 0 0 0
  1405. @TOCPG3@16.00
  1406.              35 0 16384 0 0 0 0 1 0 0 0 0
  1407. @TOC3@x_rect_pattern_clipped
  1408.              35 1 16384 0 0 0 0 1 0 0 0 0
  1409. @TOCPG3@17.00
  1410.              36 0 16384 0 0 0 0 1 0 0 0 0
  1411. @TOC3@x_rect_fill
  1412.              36 1 16384 0 0 0 0 1 0 0 0 0
  1413. @TOCPG3@17.00
  1414.              37 0 16384 0 0 0 0 1 0 0 0 0
  1415. @TOC3@x_rect_fill_clipped
  1416.              37 1 16384 0 0 0 0 1 0 0 0 0
  1417. @TOCPG3@18.00
  1418.              38 0 16384 0 0 0 0 1 0 0 0 0
  1419. @TOC3@x_cp_vid_rect
  1420.              38 1 16384 0 0 0 0 1 0 0 0 0
  1421. @TOCPG3@19.00
  1422.              39 0 16384 0 0 0 0 1 0 0 0 0
  1423. @TOC3@x_shift_rect
  1424.              39 1 16384 0 0 0 0 1 0 0 0 0
  1425. @TOCPG3@20.00
  1426.              40 0 16384 0 0 0 0 1 0 0 0 0
  1427. @TOC1@MODULE XPAL
  1428.              40 1 16384 0 0 0 0 1 0 0 0 0
  1429. @TOCPG1@21.00
  1430.              41 0 16384 0 0 0 0 1 0 0 0 0
  1431. @TOC2@SOURCES
  1432.              41 1 16384 0 0 0 0 1 0 0 0 0
  1433. @TOCPG2@21.00
  1434.              42 0 16384 0 0 0 0 1 0 0 0 0
  1435. @TOC2@C HEADER FILE
  1436.              42 1 16384 0 0 0 0 1 0 0 0 0
  1437. @TOCPG2@21.00
  1438.              43 0 16384 0 0 0 0 1 0 0 0 0
  1439. @TOC2@EXPORTED FUNCTIONS
  1440.              43 1 16384 0 0 0 0 1 0 0 0 0
  1441. @TOCPG2@22.00
  1442.              44 0 16384 0 0 0 0 1 0 0 0 0
  1443. @TOC3@x_get_pal_raw
  1444.              44 1 16384 0 0 0 0 1 0 0 0 0
  1445. @TOCPG3@22.00
  1446.              45 0 16384 0 0 0 0 1 0 0 0 0
  1447. @TOC3@x_get_pal_struc
  1448.              45 1 16384 0 0 0 0 1 0 0 0 0
  1449. @TOCPG3@22.00
  1450.              46 0 16384 0 0 0 0 1 0 0 0 0
  1451. @TOC3@x_put_pal_raw
  1452.              46 1 16384 0 0 0 0 1 0 0 0 0
  1453. @TOCPG3@22.00
  1454.              47 0 16384 0 0 0 0 1 0 0 0 0
  1455. @TOC3@x_put_pal_struc
  1456.              47 1 16384 0 0 0 0 1 0 0 0 0
  1457. @TOCPG3@23.00
  1458.              48 0 16384 0 0 0 0 1 0 0 0 0
  1459. @TOC3@x_set_rgb
  1460.              48 1 16384 0 0 0 0 1 0 0 0 0
  1461. @TOCPG3@23.00
  1462.              49 0 16384 0 0 0 0 1 0 0 0 0
  1463. @TOC3@x_rot_pal_struc
  1464.              49 1 16384 0 0 0 0 1 0 0 0 0
  1465. @TOCPG3@23.00
  1466.         [e]
  1467.     [tble]
  1468. [lay]
  1469.     Standard
  1470.     [rght]
  1471.         15840
  1472.         12240
  1473.         1440
  1474.         1440
  1475.         1440
  1476.         1440
  1477.         1440
  1478.         10800
  1479.         720
  1480.         1440
  1481.         2160
  1482.         2880
  1483.         3600
  1484.         4320
  1485.         5040
  1486.         5760
  1487.         6480
  1488.         7200
  1489.         7920
  1490.         8640
  1491.     [hrght]
  1492.     [lyfrm]
  1493.         11200
  1494.         12240
  1495.         1440
  1496.         1 0 0 0 0 0 0
  1497.     [frmlay]
  1498.         1440
  1499.         12240
  1500.         1440
  1501.         792
  1502.         1440
  1503.         1440
  1504.         10800
  1505.         4680
  1506.         9360
  1507.     [txt]
  1508. <+A><:s>
  1509. <+A><:P12,1,>
  1510.     [frght]
  1511.     [lyfrm]
  1512.         13248
  1513.         14400
  1514.         12240
  1515.         15840
  1516.         1 0 0 0 0 0 0
  1517.     [frmlay]
  1518.         15840
  1519.         12240
  1520.         1440
  1521.         792
  1522.         14472
  1523.         1440
  1524.         1440
  1525.         10800
  1526.         4680
  1527.         9360
  1528.     [txt]
  1529. [elay]
  1530. [lay]
  1531.     [rght]
  1532.         15840
  1533.         12240
  1534.         1440
  1535.         1440
  1536.         1440
  1537.         1440
  1538.         1440
  1539.         10800
  1540.         720
  1541.         1440
  1542.         2160
  1543.         2880
  1544.         3600
  1545.         4320
  1546.         5040
  1547.         5760
  1548.         6480
  1549.         7200
  1550.         7920
  1551.         8640
  1552.     [hrght]
  1553.     [lyfrm]
  1554.         11200
  1555.         12240
  1556.         1440
  1557.         1 0 0 0 0 0 0
  1558.     [frmlay]
  1559.         1440
  1560.         12240
  1561.         1440
  1562.         792
  1563.         1440
  1564.         1440
  1565.         10800
  1566.         4680
  1567.         9360
  1568.     [txt]
  1569.     [frght]
  1570.     [lyfrm]
  1571.         13248
  1572.         14400
  1573.         12240
  1574.         15840
  1575.         1 0 0 0 0 0 0
  1576.     [frmlay]
  1577.         15840
  1578.         12240
  1579.         1440
  1580.         792
  1581.         14472
  1582.         1440
  1583.         1440
  1584.         10800
  1585.         4680
  1586.         9360
  1587.     [txt]
  1588. [elay]
  1589.     1 0 5 16384 0 0 0 65535 65535 1    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 34 0 0
  1590.     1 0 5 16384 0 0 0 65535 65535 1    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 34 34 0 0
  1591.     1 0 5 16384 0 0 0 65535 65535 1    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 68 34 0 0
  1592.     1 0 5 16384 0 0 0 65535 65535 1    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 102 34 0 0
  1593.     1 0 5 16384 0 0 0 65535 65535 1    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 136 34 0 0
  1594.     1 0 5 16384 0 0 0 65535 65535 1    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 170 34 0 0
  1595.     1 5 5 17920 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1596.     44 0 0 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1597.     77 0 0 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1598.     122 0 47 0 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1599.     160 0 33 512 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1600.     199 94 28 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1601.     225 0 0 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1602.     247 0 98 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1603.     276 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1604.     294 0 76 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1605.     331 0 9 512 3 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1606.     341 0 44 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1607.     373 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1608.     400 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1609.     417 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1610.     443 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1611.     459 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1612.     481 0 55 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1613.     520 0 55 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1614.     540 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1615.     567 0 55 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1616.     585 0 92 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1617.     610 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1618.     652 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1619.     694 0 71 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1620.     727 96 31 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1621.     744 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1622.     765 0 34 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1623.     806 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1624.     843 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1625.     876 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1626.     900 0 52 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1627.     926 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1628.     966 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1629.     987 0 85 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1630.     1017 0 7 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1631.     1057 0 38 512 3 0 0 65535 6 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1632.     1094 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1633.     1131 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1634.     1144 0 16 512 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1635.     1185 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1636.     1198 0 19 512 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1637.     1225 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1638.     1255 566 88 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1639.     1269 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1640.     1296 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1641.     1326 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1642.     1343 0 95 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1643.     1375 91 75 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1644.     1405 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1645.     1435 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1646.     1475 0 82 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1647.     1482 93 13 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1648.     1517 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1649.     1533 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1650.     1568 0 21 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1651.     1594 0 26 512 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1652.     1623 87 14 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1653.     1637 0 15 512 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1654.     1669 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1655.     1708 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1656.     1720 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1657.     1757 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1658.     1787 0 15 512 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1659.     1826 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1660.     1870 0 0 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1661.     1898 0 75 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1662.     1914 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1663.     1958 0 0 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1664.     1984 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1665.     2001 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1666.     2023 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1667.     2040 197 12 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1668.     2051 0 19 512 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1669.     2076 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1670.     2086 0 13 512 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1671.     2121 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1672.     2150 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1673.     2158 0 21 512 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1674.     2198 197 42 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1675.     2210 0 37 512 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1676.     2221 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1677.     2247 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1678.     2277 188 84 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1679.     2307 0 5 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1680.     2322 0 7 512 1 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1681.     2357 0 20 0 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1682.     2380 0 45 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1683.     2402 287 58 512 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1684.     2412 0 0 1025 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  1685. [edoc]
  1686. <:s><:t0><:p</B>Standard>
  1687. <:s><:#286,9360>
  1688. <:s><:#286,9360>
  1689. <:s><:#286,9360>
  1690. <:s><:#286,9360>
  1691. <+B><:s><:#733,9360><:f720,BFinal Frontier,0,0,0> <+!>XLIB<:f>
  1692. <+B><:s><:#367,9360><:f360,BFinal Frontier,0,0,0><+!>The "Mode X" graphics library.<-!><:f>
  1693. <:s><:#286,9360> 
  1694. <:s><:#286,9360>
  1695. <:s><:#286,9360>
  1696. <:s><:#286,9360>
  1697. <:s><:#286,9360>
  1698. <:s><:#286,9360>
  1699. <:s><:#286,9360>
  1700. <:s><:#286,9360>
  1701. <:s><:#286,9360>
  1702. <:s><:#286,9360>
  1703. <:s><:#286,9360>
  1704. <:s><:#286,9360>
  1705. <:s><:#286,9360>
  1706. <:s><:#286,9360>
  1707. <:s><:#286,9360>
  1708. <:s><:#286,9360>
  1709. <:s><:#286,9360>
  1710. <:s><:#286,9360>
  1711. <:s><:#286,9360>
  1712. <:s><:#286,9360>
  1713. <:s><:#286,9360>
  1714. <:s><:#286,9360>
  1715. <:s><:#286,9360>
  1716. <:s><:#286,9360>
  1717. <:s><:#286,9360>
  1718. <:s><:#286,9360>
  1719. <:s><:#286,9360>
  1720. <:s><:#286,9360>
  1721. <:s><:#286,9360>
  1722. <:s><:#286,9360>
  1723. <:s><:#286,9360>
  1724. <:s><:#286,9360>
  1725. <+B><:s><:#286,9360>Written by:  Themie Gouthas.
  1726. <+B><:s><:#286,9360>Additional code contributed by: Matthew MacKenzie and Tore Jahn Bastiansen.
  1727. <+B><:s><:#286,9360>Manual edited by: J. Donavan Stanley.
  1728. <:s><:#286,9360>
  1729. <:s><:#286,9360>
  1730. <+B><:#333,9360><+!><:f280, Times New Roman,0,0,0>INTRODUCTION<:f><-!><:X11,-32768;TOC 1 "INTRODUCTION">
  1731. <+@><:s><:#286,9360>
  1732. <+@><:#286,9360><+!>EDITORS NOTE<:X11,-32768;TOC 2 "EDITORS NOTE">:<-!>
  1733. <:s><:#286,9360>
  1734. <:#1430,9360>"Do not trust this excuse for a manual when in doubt go to the code."  Those words were written by Themie Gouthas in each manual accompanying an XLIB release.  I have undertaken this project to provide you the end user with a high-quality, 
  1735. <+#>accurate<-#> manual to use.  I have gone to the code, checked and cross-checked everything and consulted the authors to ensure everything is correct. Just the same I'm only human, so if you spot any errors please let me know.
  1736. <:s><:#286,9360>
  1737. <:#1430,9360>Throughout this manual function names are in bold italics, variables are in regular italics.  This only holds true for those of you who are reading the non-ASCII version of this document.  If your favorite word processor isn't included in this release of th
  1738. e manual let me know and I will make very effort to support it. I also plan on making a printed, 3-ring bound versions available for a small fee (Enough to cover the cost of materials and postage) if enough people are interested. 
  1739. <:s><:#286,9360>
  1740. <:s><:#286,9360>
  1741. <:#286,9360><+!><:X11,-32768;TOC 2 "CONTACTING THE AUTHORS">CONTACTING THE AUTHORS<-!><+!>:<-!>
  1742. <:s><:#286,9360>    Themie Gouthas -   Internet:  egg@dstos3.dsto.goc.au   or  teg@bart.dsto.gov.au
  1743. <:s><:#286,9360>    Matthew MacKenzie -  Internet:  matm@eng.umd.edu
  1744. <:s><:#286,9360>    Tore Bastiansen - Internet:  toreba@ifi.uio.no
  1745. <:s><:#286,9360>    Donavan Stanley (The editor) - Internet:  bbooth@vax.cns.muskingnum.edu (This is a
  1746. <:s><:#286,9360>                                     friend who will relay your message to me.)
  1747. <:s><:#286,9360>                       BBS:   The Last Byte BBS (614) 432-3564.
  1748. <:s><:#286,9360>
  1749. <:s><:#286,9360>
  1750. <:#286,9360><+!>DISCLAIMER<:X11,-32768;TOC 2 "DISCLAIMER"><-!>
  1751. <:s><:#286,9360><+!>
  1752. <:s><:#865,9360><+!>This library is distributed AS IS.<-!>  The authors specifically disclaim any responsibility for any loss of profit or any incidental, consequential or other damages.  The authors reserve ALL rights to the code contained in XLIB.
  1753. <:s><:#286,9360>
  1754. <:s><:#286,9360>
  1755. <:#286,9360><+!>ABOUT XLIB<:X11,-32768;TOC 2 "ABOUT XLIB"><-!>
  1756. <:s><:#286,9360>
  1757. <:s><:#865,9360>XLIB  is a "user supported freeware" graphics library specifically designed with game programming in mind. It has been released to the public for the benefit of all and is the result of 
  1758. <+!>MANY<-!> hours of or work. 
  1759. <:s><:#286,9360>
  1760. <:s><:#293,9360>All users <+!>must <-!>comply with the following guidelines:
  1761. @Number List@<:s><:#286,9360>Leave the code in the public domain.
  1762. @Number List@<:s><:#286,9360>Do not distribute any modified or incomplete versions of this library.
  1763. <:s><:#286,9360>
  1764. <:s><:#286,9360>New contributions and comments are welcome. There will be more releases as the code evolves.
  1765. <:s><:#286,9360>
  1766. <:#286,9360><+!>GENERAL FEATURES<:X11,-32768;TOC 2 "GENERAL FEATURES"><-!>
  1767. <:s><:#286,9360>
  1768. @Bullet 1@<:s><:#286,9360>    Support for a number of 256 color tweaked graphics mode resolutions   
  1769. <:s><:#286,9360>    320x200 320x240 360x200 360x240 376x282 320x400 320x480 360x400 360x480 
  1770. <:s><:#286,9360>    360x360 376x308 376x564
  1771. <:s><:#286,9360>
  1772. @Bullet 1@<:s><:#286,9360>    Virtual screens larger than the physical screen (memory  permitting) that can be panned at 
  1773. <:s><:#286,9360>    pixel resolution in all directions
  1774. <:s><:#286,9360>
  1775. @Bullet 1@<:s><:#286,9360>    A split screen capability for status displays etc.
  1776. <:s><:#286,9360>
  1777. @Bullet 1@<:s><:#286,9360>    Text functions supporting 8x8 and 8x14 ROM fonts and user defined fonts
  1778. <:s><:#286,9360>
  1779. @Bullet 1@<:s><:#286,9360>    Support for page flipping
  1780. <:s><:#286,9360>
  1781. @Bullet 1@<:s><:#286,9360>    Graphics primitives such as line and rectangle drawing functions.
  1782. <:s><:#286,9360>
  1783. @Bullet 1@<:s><:#286,9360>    Bit block manipulation functions
  1784. <:s><:#286,9360>
  1785. <:s><:#286,9360><:f240, Times New Roman,0,0,0>
  1786. @Bullet@<:s><:#286,9360><:f240, Times New Roman,0,0,0>Please note that some of the resolutions best suit monitors with adjustable vertical height.<:f>
  1787. <:s><:#286,9360>
  1788. <:s><:#286,9360>
  1789. <:#286,9360><+!>MODULES COMPRISING XLIB<:X11,-32768;TOC 2 "MODULES COMPRISING XLIB">   
  1790. <:s><:#286,9360>
  1791. <:s><:#286,9360>    XMAIN             Main module containing mode setting code and basic functions   
  1792. <:s><:#286,9360>    XPOINT            Pixel functions   
  1793. <:s><:#286,9360>    XRECT             Filled rectangle and VRAM to VRAM block move functions   
  1794. <:s><:#286,9360>    XPAL             Palette functions   
  1795. <:s><:#286,9360>    XLINE             Line functions   
  1796. <:s><:#286,9360>    XTEXT             Text and font functions   
  1797. <:s><:#286,9360>    XPRINTF           Printf style string output   
  1798. <:s><:#286,9360>    XPBITMAP          Planar bitmap functions   
  1799. <:s><:#286,9360>    XPBMCLIP          Clipped planar bitmap functions   
  1800. <:s><:#286,9360>    XCBITMAP         Compiled bitmap functions using linear bitmaps.  
  1801. <:s><:#286,9360>    XCOMPPBM        Compiled bitmap functions using planar bitmaps.
  1802. <:s><:#286,9360>    XVBITMAP         Video bitmap functions   
  1803. <:s><:#286,9360>    XMAKEVBM      Support module for video bitmaps   
  1804. <:s><:#286,9360>    XMOUSE            Mouse functions
  1805. <:s><:#286,9360>    XBMTOOLS          Bitmap format conversion tools
  1806. <:s><:#286,9360>    XCLIPPBM        Clipped planar bitmap functions. (Uses blits.)   
  1807. <:s><:#286,9360>    XCIRCLE        Circle Drawing functions.
  1808. <:s><:#286,9360>    XDETECT           Hardware detection module   
  1809. <:s><:#286,9360>    XFILEIO           File I/O functions   
  1810. <:s><:#286,9360>    XRLETOOL          RLE encoding/decoding functions   
  1811. <+@><:s><:#286,9360>    XPOLYGON        Convex polygon and triangle functions.
  1812. <+@><:s><:#286,9360>    XBEZIER           Bezier curve drawing 
  1813. <+@><:s><:#286,9360>    XFILL            General purpose flood fill routines.
  1814. <+@><:#286,9360>    XVSYNC        Simulated vertical retrace Interrupt module.
  1815. <+@><:#286,9360>    XCBITM32        32 Bit compiled bitmaps.
  1816. <+B><:s><:#286,9360>
  1817. <+B><:s><:#286,9360>
  1818. <+@><:#286,9360><:f240, Times New Roman,0,0,0><+!>GLOBAL DEFINES<:X11,-32768;TOC 2 "GLOBAL DEFINES"> (xlib.inc)<-!><:f>
  1819. <+B><:s><:#333,9360><+!><:f280,2Times New Roman,0,0,0>
  1820. <:s><:#286,9360><+!>    Types:
  1821. <:s><:#286,9360>        BYTE unsigned char 
  1822. <:s><:#286,9360>        WORD unsigned int
  1823. <:s><:#286,9360>
  1824. <:s><:#286,9360>
  1825. <:s><:#286,9360><+!>    Available X mode resolutions:<-!>
  1826. <:s><:#286,9360>        X_MODE_320x200  0 
  1827. <:s><:#286,9360>        X_MODE_320x240  1 
  1828. <:s><:#286,9360>        X_MODE_360x200  2 
  1829. <:s><:#286,9360>        X_MODE_360x240  3 
  1830. <:s><:#286,9360>        X_MODE_360x282  4 
  1831. <:s><:#286,9360>        X_MODE_320x400  5 
  1832. <:s><:#286,9360>        X_MODE_320x480  6 
  1833. <:s><:#286,9360>        X_MODE_360x400  7 
  1834. <:s><:#286,9360>        X_MODE_360x480  8 
  1835. <:s><:#286,9360>        X_MODE_360x360  9 
  1836. <:s><:#286,9360>        X_MODE_376x308  10 
  1837. <:s><:#286,9360>        X_MODE_376x564  11
  1838. <:s><:#286,9360>
  1839. <:s><:#286,9360>
  1840. <:s><:#286,9360><+!>    Palette rotation direction<-!><+!>:<-!>
  1841. <:s><:#286,9360>        BACKWARD 0 
  1842. <:s><:#286,9360>        FORWARD    1
  1843. <:s><:#286,9360>
  1844. <:s><:#286,9360>
  1845. <:s><:#286,9360><+!>    Function return values:<-!>
  1846. <:s><:#286,9360>        X_MODE_INVALID   -1 
  1847. <:s><:#286,9360>        ERROR                          1 
  1848. <:s>        OK                             0<:p<* >>
  1849. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XMAIN<:X11,-32768;TOC 1 "MODULE XMAIN"><-!><:f>
  1850. <:s><:#286,9360>
  1851. <:s><:#286,9360>
  1852. <:s><:#572,9360>The Xmain module is the base module of the XLIB library. It contains the essential functions that initialize and customize the graphic environment.
  1853. <:s><:#286,9360>
  1854. <:s><:#286,9360>
  1855. <:#286,9360><+!><:f,,>SOURCES<:X11,-32768;TOC 2 "SOURCES"><-!>
  1856. <:s><:#286,9360>    xmain.asm 
  1857. <:s><:#286,9360>    xmain.inc 
  1858. <:s><:#286,9360>    xlib.inc 
  1859. <:s><:#286,9360>    model.inc
  1860. <:s><:#286,9360>
  1861. <:s><:#286,9360>
  1862. <:#286,9360><+!>C HEADER FILE<:X11,-32768;TOC 2 "C HEADER FILE"><-!>
  1863. <:s><:#286,9360>    xlib.h
  1864. <:s><:#286,9360>
  1865. <:s><:#286,9360>
  1866. <:#286,9360><+!>EXPORTED VARIABLES<:X11,-32768;TOC 2 "EXPORTED VARIABLES"><-!>
  1867. <:s><:#286,9360>
  1868. <:s><:#579,9360><+!>NOTE: <-!>All variables are read only unless otherwise specified. 
  1869. <+#>If you modify  them manually, the results may be unpredictable<-#>.
  1870. <:s><:#286,9360>
  1871. <:s><:#293,9360><+">InGraphics<-"> BYTE- Flag indicating that the xlib graphics system is active. Set by function
  1872. <:s><:#293,9360><+!><+">x_set_mode<-"><-!>.
  1873. <:s><:#286,9360>
  1874. <:s><:#586,9360><+">CurrXMode<-"> WORD - If the xlib graphics system is active, contains the id of the x mode. Set by function 
  1875. <+!><+">x_set_mode<-"><-!>. <+"> <-">See also: defines (i.e. X_MODE_320x200 ... )
  1876. <:s><:#286,9360>
  1877. <:s><:#293,9360><+">ScrnPhysicalByteWidth<-"> WORD - Physical screen width in bytes. Set by function 
  1878. <+!><+">x_set_mode<-"><-!>
  1879. <:s><:#286,9360>
  1880. <:s><:#293,9360><+">ScrnPhysicalPixelWidth<-"> WORD - Physical screen width in pixels. Set by function 
  1881. <+!><+">x_set_mode<-"><-!>
  1882. <:s><:#286,9360><+!>
  1883. <:s><:#293,9360><+">ScrnPhysicalHeight<-"> WORD - Physical screen height in pixels. Set by function 
  1884. <+!><+">x_set_mode<-"><-!>.
  1885. <:s><:#286,9360>
  1886. <:s><:#293,9360><+">ScrnLogicalByteWidth<-"> WORD - Virtual screen width in bytes. Set by function 
  1887. <+!><+">x_set_mode<-"><-!>.
  1888. <:s><:#286,9360>
  1889. <:s><:#293,9360><+">ScrnLogicalPixelWidth<-"> WORD - Virtual screen width in pixels. Set by function 
  1890. <+!><+">x_set_mode<-"><-!>.
  1891. <:s><:#286,9360>
  1892. <:s><:#586,9360><+">ScrnLogicalHeight<-"> WORD - Virtual screen height in pixels. Set initially by function 
  1893. <+!><+">x_set_mode<-"><-!> but is updated by functions <+!><+">x_set_splitscrn<-"><-!> and 
  1894. <+!><+">x_set_doublebuffer<-"><-!>.
  1895. <:s><:#286,9360>
  1896. <:s><:#586,9360><+">MaxScrollX<-">  WORD - Max. X pixel position of physical screen within virtual screen. Set by function 
  1897. <+!><+">x_set_mode<-"><-!>.
  1898. <:s><:#586,9360><+">MaxScrollY<-"> WORD - Max. Y pixel position of physical screen within virtual screen. Set initially by function 
  1899. <+!><+">x_set_mode<-"><-!> but is updated by functions <+!><+">x_set_splitscrn<-"><-!> and 
  1900. <+!><+">x_set_doublebuffer<-"><-!>.
  1901. <:s><:#293,9360><+">
  1902. <:s><:#865,9360><+">ErrorValue<-"> WORD - Contains error value. General use variable to communicate the error status from several functions. The value in this variable usually is only valid for the last function called that sets it.
  1903. <:s><:#286,9360>
  1904. <:s><:#586,9360><+">SplitScrnOffs<-"> WORD - Offset in video ram of split screen. Set by function 
  1905. <+!><+">x_set_splitscrn<-"><-!>. The value is only valid if a split screen is active. See also: global variable 
  1906. <+">SplitScrnActive<-">.
  1907. <:s><:#286,9360>
  1908. <:s><:#879,9360><+">SplitScrnScanLine<-"> WORD - Screen Scan Line the Split Screen starts at  initially when set by function<+!><+"> x_set_splitscrn<-"><-!>. 
  1909. <+#>The value is only valid if a split screen is active<-#>. See also: global variable<+"> SplitScrnActive<-">. This variable is not updated by 
  1910. <+!><+">x_hide_splitscrn<-"><-!> or <+!><+">x_adjust_splitscrn<-"><-!>.
  1911. <:s><:#286,9360>
  1912. <:s><:#586,9360><+">SplitScrnVisibleHeight<-"> WORD - The number of rows of the initial split screen which are currently displayed. Modified by 
  1913. <+!><+">x_hide_splitscrn<-"><-!>, <+!><+">x_adjust_splitscrn<-"><-!> and 
  1914. <+!><+">x_show_splitscrn<-"><-!>.
  1915. <:s><:#286,9360>
  1916. <:s><:#586,9360><+">Page0_Offs<-"> WORD - Offset in video ram of main virtual screen. Initially set by function 
  1917. <+!><+">x_set_mode<-"><-!> but is updated by functions <+!><+">x_set_splitscrn<-"><-!> and 
  1918. <+!><+">x_set_doublebuffer<-"><-!>.
  1919. <:s><:#286,9360>
  1920. <:s><:#586,9360><+">Page1_Offs<-"> WORD - Offset in video ram of second virtual screen. Set by and only is valid after a call to 
  1921. <+!><+">x_set_doublebuffer <-"><-!> or <+!><+">x_triple_buffer.<-"><-!>
  1922. <:s><:#286,9360>
  1923. <:s><:#586,9360><+">Page2_Offs<-"> WORD - Offset in video ram of the third virtual screen. Set by and is only valid after a call to 
  1924. <+!><+">x_triple_buffer.<-"><-!>
  1925. <:s><:#286,9360><+!><+">
  1926. <:s><:#872,9360><+">WaitingPageOffs<-"> WORD - Offset in video ram of the page waiting to be invisible. Initially set by 
  1927. <+!><+">x_triple_buffer <-!><-">but is updated by <+!><+">x_page_flip<-!><-">. This variable is only used while triple buffering is active.<-"><-">
  1928. <:s><:#286,9360>
  1929. <:s><:#586,9360><+">HiddenPageOffs<-"> WORD - Offset of hidden page. Initially set by function 
  1930. <+!><+">x_set_doublebuffer<-"><-!> but is updated by <+!><+">x_page_flip<-"><-!>. 
  1931. <+#>This variable  is only used while double (or triple ) buffering is on<-#>.
  1932. <:s><:#286,9360>
  1933. <:s><:#586,9360><+">VisiblePageOffs<-"> WORD - Offset of visible page. Initially set by function  
  1934. <+!><+">x_set_doublebuffer<-"><-!> but is updated by <+!><+">x_page_flip<-"><-!>. 
  1935. <+#>This variable is only used while double (or triple) buffering is on<-#>.
  1936. <:s><:#286,9360>
  1937. <:s><:#879,9360><+">NonVisual_Offs<-"> WORD - Offset of first byte of non-visual ram, the ram that is available for bitmap storage etc. Set initially by function 
  1938. <+!><+">x_set_mode<-"><-!> but is updated by functions <+!><+">x_set_splitscrn<-"><-!> and 
  1939. <+!><+">x_set_doublebuffer<-"><-!>.
  1940. <:s><:#286,9360>
  1941. <:s><:#872,9360><+">VisiblePageIdx<-"> WORD - Index number of current visible page. Initially set by function 
  1942. <+!><+">x_set_doublebuffer<-"><-!> but is updated by <+!><+">x_page_flip<-"><-!>. 
  1943. <+#>This variable is only used while double( or triple) buffering is on<-#>.
  1944. <:s><:#286,9360>
  1945. <:s><:#586,9360><+">DoubleBufferActive<-"> WORD - Indicates whether double-buffering is on. Set by function 
  1946. <+!><+">x_set_doublebuffer<-"><-!>.
  1947. <:s><:#286,9360>
  1948. <:s><:#579,9360><+">TripleBufferActive<-"> WORD - Indicates whether triple-buffering is active. Set by function 
  1949. <+!><+">x_triple_buffer.<-"><-!>
  1950. <:s><:#286,9360><+!><+">
  1951. <:s><:#586,9360><+">TopClip, BottomClip, LeftClip RightClip<-"> WORD - Defines the clipping rectangle for linear and Video clipped bitmap put functions. Set either manually or by 
  1952. <+!><+">x_set_cliprect. <-"><-!>
  1953. <:s><:#293,9360><+!>Note:<-!> <+#>X coordinates are in bytes as all clip functions clip to byte boundaries<-#>.
  1954. <:s><:#286,9360>
  1955. <:s><:#579,9360><+">PhysicalStartPixelX<-"> WORD - X pixel Offset of physical (visible) screen relative to the upper left hand corner (0,0) of the virtual screen.
  1956. <:s><:#286,9360>
  1957. <:s><:#579,9360><+">PhysicalStartByteX<-"> WORD - X byte Offset of physical (visible) screen relative to the upper left hand corner (0,0) of the virtual screen.
  1958. <:s><:#286,9360>
  1959. <:s><:#579,9360><+">PhysicalStartY<-">  WORD - Y pixel Offset of physical (visible) screen relative to the upper left hand corner (0,0) of the virtual screen.
  1960. <:s><:#286,9360>
  1961. <:s><:#579,9360><+">StartAddressFlag<-"> WORD - This flag is set if there is a new start address waiting to be set by the vsync handler.
  1962. <:s><:#286,9360>
  1963. <:s><:#586,9360><+">WaitingStartLow, WaitingStartHigh, WaitingPelPan<-"> WORD - These are used by the vsync handler 
  1964. <+#>only<-#>. <+!>Do not modify!
  1965. <:s><:#286,9360><+!>
  1966. <:s><:#579,9360><+">VsyncPaletteCount <-">WORD - The start index of the video DAC register to be updated during the next vsync.  Set by the palette functions.
  1967. <:s><:#286,9360>
  1968. <:#579,9360><+">VsyncPaletteCount<-"> WORD - The number of palette entries to be outed during the next vsync. Set by the palette functions.
  1969. <:s><:#286,9360>
  1970. <:s><+">VsyncPaletteBuffer <-">BYTE<[>768] - A buffer containing values for the next update of the DAC.<:p<* >>
  1971. <+@><:#286,9360><:f240, Times New Roman,0,0,0><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!><:f>
  1972. <+B><:s><:#333,9360><+!><:f280,2Times New Roman,0,0,0>
  1973. <+B><:s><:#333,9360><+!><:f280,2Times New Roman,0,0,0>
  1974. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_set_mode<:X11,-32768;TOC 3 "x_set_mode"><-"><-!><:f>
  1975. <:s><:#293,9360><+!>C Prototype:<-!>  extern WORD x_set_mode(WORD mode, WORD WidthInPixels);
  1976. <:s><:#286,9360>
  1977. <:s><:#579,9360><+">mode <-">- The required mode as defined by the "Available X Mode resolutions" set of defines in the xlib.h header file.     
  1978. <:s><:#286,9360>
  1979. <:s><:#293,9360><+">WidthInPixels<-"> - The required virtual screen width.     
  1980. <:s><:#286,9360>
  1981. <:s><:#293,9360><+!>Returns:<-!> The actual width in pixels of the allocated virtual screen
  1982. <:s><:#286,9360>
  1983. <:s><:#865,9360>This function initializes the graphics system, setting the appropriate screen resolution and allocating a virtual screen. The virtual screen allocated may not necessarily be of the same size as specified in the 
  1984. <+">WidthInPixels<-"> parameter as it is rounded down to the nearest multiple of 4.
  1985. <:s><:#286,9360>
  1986. <:s><:#572,9360>The function returns the actual width of the allocated virtual screen  in pixels if a valid mode was selected otherwise returns  X_MODE_INVALID.
  1987. <:s><:#286,9360>
  1988. <:s><:#1172,9360>Saves virtual screen pixel width in <+">ScrnLogicalPixelWidth<-">. Saves virtual screen byte width in 
  1989. <+">ScrnLogicalByteWidth<-">. Physical screen dimensions are set in 
  1990. <+">ScrnPhysicalPixelWidth<-">.  <+">ScrnPhysicalByteWidth<-"> and 
  1991. <+">ScrnPhysicalHeight<-">. Other global variables set are <+">CurrXMode<-">, 
  1992. <+">MaxScrollX<-">, <+">MaxScrollY<-">, <+">InGraphics<-">. The variable 
  1993. <+">SplitScrnScanLine<-"> is also initialized  to zero.
  1994. <:s><:#286,9360>
  1995. <:s><:#293,9360><+!>See also:<-!> "Available X Mode resolutions." and "What is Mode X?"
  1996. <:s><:#286,9360>
  1997. <:s><:#286,9360>
  1998. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_select_default_plane<:X11,-32768;TOC 3 "x_select_default_plane"><-"><-!><:f>
  1999. <:s><:#293,9360><+!>C Prototype<-!>:  void x_select_default_plane(BYTE plane);
  2000. <:s><:#286,9360>
  2001. <:s><:#293,9360><+">plane<-"> - The plane number you wish to work with.
  2002. <:s><:#286,9360>
  2003. <:s><:#286,9360>Enables default Read/Write access to a specified plane
  2004. <:s><:#286,9360>
  2005. <:s><:p<* >>
  2006. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_set_splitscreen<:X11,-32768;TOC 3 "x_set_splitscreen"><-"><-!><:f>
  2007. <:s><:#293,9360><+!>C Prototype:<-!>  extern void x_set_splitscreen(WORD line);
  2008. <:s><:#286,9360>
  2009. <:s><:#293,9360><+">line<-"> - The starting scan line of the required split screen.
  2010. <:s><:#286,9360>
  2011. <:s><:#572,9360>This function activates Mode X split screen and sets starting scan  line. The split screen resides on the bottom half of the screen and has a starting address of A000:0000 in video RAM.
  2012. <:s><:#286,9360>
  2013. <:s><:#1172,9360>It also updates <+">Page0_Offs<-"> to reflect the existence of the split screen region 
  2014. <+">MainScrnOffset<-"> is set to the offset of the first pixel beyond the split screen region. Other variable set are 
  2015. <+">Page1_Offs<-"> which is set to the same value as <+">Page0_Offs<-"> (See call sequence below), 
  2016. <+">ScrnLogicalHeight<-">, <+">ScrnPhysicalHeight<-">, <+">SplitScrnScanLine<-"> and 
  2017. <+">MaxScrollY<-">.
  2018. <:s><:#286,9360>
  2019. <:s><:#858,9360>This function cannot be called after double buffering has been activated, it will return an error. To configure your graphics environment the sequence of graphics calls is as follows although either or both steps b and c may be omitted:    
  2020. <:s><:#293,9360>    a) <+!><+">x_set_mode    <-"><-!>
  2021. <:s><:#293,9360>    b) <+!><+">x_set_splitscreen    <-"><-!>
  2022. <:s><:#293,9360>    c) <+!><+">x_set_doublebuffer  <-"><-!>
  2023. <:s><:#586,9360>Thus when you call this function successfully, double buffering is not active so 
  2024. <+">Page1_Offs<-"> is set to the same address as <+">Page0_Offs<-">.
  2025. <:s><:#286,9360>
  2026. <:s><:#865,9360><+!>WARNING:<-!> If you use one of the high resolution modes (376x564 as an extreme example) you may not have enough video ram for split screen and double buffering options since VGA video RAM is restricted to 64K.
  2027. <:s><:#286,9360>
  2028. <:s><+!>See Also:<-!> "What is a Split Screen?" and "What is double buffering?"<:p<* >>
  2029. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_set_doublebuffer<:X11,-32768;TOC 3 "x_set_doublebuffer"><-"><-!><:f>
  2030. <:s><:#293,9360><+!>C Prototype:<-!> extern WORD x_set_doublebuffer(WORD PageHeight);
  2031. <:s><:#286,9360>
  2032. <:s><:#293,9360><+">PageHeight<-"> - The height of the two double buffering virtual screens.  
  2033. <:s><:#286,9360>
  2034. <:s><:#293,9360><-!><+!>Returns:<-!> The closest possible height to the requested page height.
  2035. <:s><:#286,9360>
  2036. <:s><:#579,9360>This function sets up two double buffering virtual pages. <+">ErrorValue<-"> is set according to the success or failure of this command.
  2037. <:s><:#286,9360>
  2038. <:s><:#286,9360>Other variables set are:
  2039. <:s><:#293,9360>    <+">Page1_Offs<-"> - Offset of second virtual page    
  2040. <:s><:#286,9360>
  2041. <:s><:#293,9360>    <+">NonVisual_Offs<-"> - Offset of first non visible video ram byte    
  2042. <:s><:#286,9360>
  2043. <:s><:#293,9360>    <+">DoubleBufferActive<-"> - Flag    
  2044. <:s><:#286,9360>
  2045. <:s><:#293,9360>    <+">PageAddrTable<-"> - Table of Double buffering pages start offsets    
  2046. <:s><:#286,9360>
  2047. <:s><:#293,9360>    <+">ScrnLogicalHeight<-"><+"> <-">- Logical height of the double buffering pages    
  2048. <:s><:#286,9360>
  2049. <:s><:#293,9360>    <+">MaxScrollY<-"> - Max. vertical start address of physical screen within the virtual screen
  2050. <:s><:#286,9360>
  2051. <:s><:#865,9360><+!>WARNING<-!>: If you use one of the high resolution modes (376x564 as an extreme example) you may not have enough video ram for split screen and double buffering options since VGA video RAM is restricted to 64K.
  2052. <:s><:#286,9360>
  2053. <:s><:#293,9360><+!>See Also:<-!> "What is double buffering?" 
  2054. <:s><:#286,9360>
  2055. <:s><:#286,9360>
  2056. <:s><:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_triple_buffer
  2057. <:s><:#293,9360><+!>C Prototype: <-!>void x_triple_buffer( WORD PageHeight );
  2058. <:s><:#286,9360>
  2059. <:s><:#293,9360><+">PageHeight<-"> - The desired height of the virtual screen.
  2060. <:s><:#286,9360>
  2061. <:#1172,9360>This function behaves like <+!><+">x_double_buffer<-!><-"> but when used with 
  2062. <+!><+">x_install_vsync_handler<-!><-"> you can draw immediately after a page flip.  When 
  2063. <+!><+">x_page_flip<-!><-"> is called, <+">VisiblePageOffs<-"> is set to the page that will be displayed during the next vysnc.  Until then, 
  2064. <+">WaitingPageOffs <-">will be displayed. You can draw to <+">HiddenPageOffs<-">.<-">
  2065. <:s><:#286,9360>
  2066. <:s><:#293,9360><+!>See also: <-!>"What is triple buffering?" 
  2067. <:s><:#286,9360>
  2068. <:s><+!><+"><:p<* >>
  2069. <:#326,9360><-"><-"><+!><+"><:f280, Times New Roman,0,0,0><:X11,-32768;TOC 3 "x_hide_splitscreen">x_hide_splitscreen<-"><-!><:f>
  2070. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_hide_splitscreen(void);
  2071. <:s><:#286,9360>
  2072. <:s><:#865,9360>This function hides an existing split screen by setting its starting scan line to the last physical screen scan line. 
  2073. <+">ScreenPhysicalHeight<-"> is adjusted but the <+">SplitScreenScanLine<-"> is not altered as it is required for restoring the split screen at a later stage.
  2074. <:s><:#286,9360>
  2075. <:s><:#293,9360><+!>WARNING<-!>: <+#>Only to be used if SplitScrnLine has been previously called<-#>
  2076. <:s><:#286,9360>
  2077. <:s><:#858,9360>Disabled for modes 5-11 (320x400-376x564). The memory for the initial split screen is reserved and the size limitations of these modes means any change in the split screen scan line will encroach on the split screen ram 
  2078. <:s><:#286,9360>
  2079. <:s><+!>See Also:<-!> "What is a split screen?"<:p<* >>
  2080. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_show_splitscreen<:X11,-32768;TOC 3 "x_show_splitscreen"><-"><-!><:f>
  2081. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_show_splitscreen(void);
  2082. <:s><:#286,9360>
  2083. <:s><:#579,9360>Restores split screen start scan line to the initial split screen starting scan line as set by 
  2084. <+">SplitScrnScanLine<-">.  <+">ScreenPhysicalHeight<-"> is adjusted.
  2085. <:s><:#286,9360>
  2086. <:s><:#293,9360><+!>WARNING: <-!><+#> Only to be used if SplitScrnLine has been previously called.<-#>
  2087. <:s><:#286,9360>
  2088. <:s><:#858,9360>Disabled for modes 5-11 (320x400-376x564). The memory for the initial split screen is reserved and the size limitations of these modes means any change in the split screen scan line will encroach on the split screen ram
  2089. <:s><:#286,9360>
  2090. <:s><:#286,9360>
  2091. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_adjust_splitscreen">x_adjust_splitscreen<-"><-!><:f>
  2092. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_adjust_splitscreen(WORD line);
  2093. <:s><:#286,9360>
  2094. <:s><:#293,9360><+">line <-">- The scan line at which the split screen is to start.
  2095. <:s><:#286,9360>
  2096. <:s><:#865,9360>Sets the split screen start scan line to a new scan line. Valid scan lines are between the initial split screen starting scan line and the last physical screen scan line. 
  2097. <+">ScreenPhysicalHeight<-"> is also adjusted.
  2098. <:s><:#286,9360>
  2099. <:s><:#293,9360><+!>WARNING:<-!> <+#>Only to be used if SplitScrnLine has been previously called.<-#>
  2100. <:s><:#286,9360>
  2101. <:s><:#858,9360>Disabled for modes 5-11 (320x400-376x564). The memory for the initial split screen is reserved and the size limitations of these modes means any change in the split screen scan line will encroach on the split screen ram
  2102. <:s><:#286,9360>
  2103. <:s><:#286,9360>
  2104. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_set_start_addr<:X11,-32768;TOC 3 "x_set_start_addr"><-"><-!><:f>
  2105. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_set_start_addr(WORD X,WORD Y);
  2106. <:s><:#286,9360>
  2107. <:s><:#293,9360><+">X, Y<-"><+!> <-!>- coordinates of top left corner of physical screen within current virtual screen.
  2108. <:s><:#286,9360>
  2109. <:s><:#286,9360>Set Mode X non split screen physical start address within current virtual  page. 
  2110. <:s><:#286,9360><+#>
  2111. <:#586,9360><+!>WARNING: <-!>X must not exceed (Logical screen width - Physical screen width)  i.e. 
  2112. <+">MaxScrollX,<-"> and <+">Y<-"> must not exceed (Logical screen height -  Physical screen height) i.e. 
  2113. <+">MaxScrollY<-">.
  2114. <:s><:#286,9360>
  2115. <:s><:p<* >>
  2116. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_page_flip">x_page_flip<-"><-!><:f>
  2117. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_page_flip(WORD X,WORD Y);
  2118. <:s><:#286,9360>
  2119. <:#579,9360><+">X,Y <-">- coordinates of top left corner of physical screen within the hidden virtual screen if double buffering is active, or the current virtual screen otherwise.
  2120. <:s><:#286,9360>
  2121. <:s><:#579,9360>Sets the physical screen start address within currently hidden virtual page and then flips pages. If double buffering is not active then this function is functionally equivalent to 
  2122. <+!><+">x_set_start_addr<-"><-!>.
  2123. <:s><:#286,9360>
  2124. <:#586,9360><+!>WARNING: <-!><+">X<-"> must not exceed (Logical screen width - Physical screen width)  i.e. 
  2125. <+">MaxScrollX<-">, and <+">Y<-"> must not exceed (Logical screen height -  Physical screen height) i.e. 
  2126. <+">MaxScrollY<-">.
  2127. <:s><:#286,9360>
  2128. <:s><:#286,9360>
  2129. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_text_mode<:X11,-32768;TOC 3 "x_text_mode"><-"><-!><:f>
  2130. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_text_mode(void);
  2131. <:s><:#286,9360>
  2132. <:s><:#286,9360>Disables graphics mode.
  2133. <:s><:#286,9360>
  2134. <:s><:#286,9360>
  2135. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_set_cliprect<:X11,-32768;TOC 3 "x_set_cliprect"><-"><-!><:f>
  2136. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_set_cliprect(WORD left,WORD top,WORD right, WORD bottom);
  2137. <:s><:#286,9360>
  2138. <:#293,9360><+">left, top<-"> - X and Y coordinates of the upper left corner of the clipping area.
  2139. <:s><:#286,9360>
  2140. <:s><:#293,9360><+">right, bottom<-"> - X and Y coordinates of the lower right corner of the clipping area.
  2141. <:s><:#286,9360>
  2142. <:s><:#286,9360>Defines the clipping rectangle for clipping versions of planar and video bitmap puts.
  2143. <:s><:#286,9360>
  2144. <:s><:#293,9360><+!>NOTE: <-!>Compiled bitmaps cannot be clipped.
  2145. <:s><:p<* >>
  2146. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XPOINT<:X11,-32768;TOC 1 "MODULE XPOINT"><-!><:f>
  2147. <:s><:#286,9360>
  2148. <:s><:#286,9360>
  2149. <:s><:#286,9360>Point functions all MODE X 256 Color resolutions
  2150. <:s><:#286,9360>
  2151. <:s><:#286,9360>
  2152. <:#286,9360><+!><:X11,-32768;TOC 2 "SOURCES">SOURCES<-!>
  2153. <:s><:#286,9360>    xpoint.asm 
  2154. <:s><:#286,9360>    xpoint.inc 
  2155. <:s><:#286,9360>    xlib.inc 
  2156. <:s><:#286,9360>    model.inc
  2157. <:s><:#286,9360>
  2158. <:s><:#286,9360>
  2159. <:#286,9360><+!>C HEADER FILE<:X11,-32768;TOC 2 "C HEADER FILE"><-!>
  2160. <:s><:#286,9360>    xpoint.h
  2161. <:s><:#286,9360>
  2162. <:s><:p<* >>
  2163. <:#286,9360><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!>
  2164. <:s><:#286,9360>
  2165. <:s><:#286,9360>
  2166. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_put_pix<:X11,-32768;TOC 3 "x_put_pix"><-"><-!><:f>
  2167. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_put_pix(WORD X,WORD Y,WORD PageOffset, WORD Color);
  2168. <:s><:#286,9360>
  2169. <:s><:#293,9360><+">X, Y<-">  - Coordinates to draw the pixel at.
  2170. <:s><:#286,9360>
  2171. <:s><:#293,9360><+">PageOffset<-"> - Virtual page offset to draw on.
  2172. <:s><:#286,9360>
  2173. <:s><:#293,9360><+">Color<-"><+!> <-!>- The color to use.
  2174. <:s><:#286,9360>
  2175. <:s><:#286,9360>Draw a point of specified color.
  2176. <:s><:#293,9360><+">
  2177. <:s><:#293,9360><+">
  2178. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_get_pix">x_get_pix<-"><-!><:f>
  2179. <:s><:#293,9360><+!>C Prototype:<-!> extern WORD x_get_pix(WORD X, WORD Y, WORD PageBase);
  2180. <:s><:#286,9360>
  2181. <:s><:#293,9360><+">X, Y<-">  - Coordinates of  the pixel to get.
  2182. <:s><:#286,9360>
  2183. <:s><:#293,9360><+">PageOffset<-"> - Virtual page offset the pixel is located on.
  2184. <:s><:#286,9360>
  2185. <:s><:#293,9360><+!>Returns:<-!> The color value of the pixel.
  2186. <:s><:#286,9360>
  2187. <:s><:#293,9360>Read a pixel from the given coordinates<+"> <-">within the given virtual page.
  2188. <:s><:p<* >>
  2189. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XRECT<:X11,-32768;TOC 1 "MODULE XRECT"><-!><:f>
  2190. <:s><:#286,9360>
  2191. <:s><:#286,9360>Screen rectangle display and manipulation functions
  2192. <:s><:#286,9360>
  2193. <:s><:#286,9360>
  2194. <:#286,9360><+!>SOURCES<:X11,-32768;TOC 2 "SOURCES"><-!>
  2195. <:s><:#286,9360>    xrect.asm 
  2196. <:s><:#286,9360>    xrect.inc 
  2197. <:s><:#286,9360>    xlib.inc 
  2198. <:s><:#286,9360>    model.inc
  2199. <:s><:#286,9360>
  2200. <:s><:#286,9360>
  2201. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  2202. <:s><:#286,9360>    xrect.h
  2203. <:s><:#286,9360>
  2204. <:s><:p<* >>
  2205. <:#286,9360><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!>
  2206. <:s><:#286,9360>
  2207. <:s><:#286,9360>
  2208. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_rect_pattern">x_rect_pattern<-"><-!><:f>
  2209. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_rect_pattern(WORD StartX, WORD StartY, WORD EndX, 
  2210. <:s><:#286,9360>                              WORD EndY, WORD PageBase,BYTE far *Pattern);
  2211. <:s><:#286,9360>
  2212. <:s><:#293,9360><+">StartX, StartY<-"> - Coordinates of upper left hand corner of the rectangle.  
  2213. <:s><:#286,9360>
  2214. <:s><:#293,9360><+">EndX, EndY<-">  - Coordinates of lower right hand corner of  the rectangle.  
  2215. <:s><:#286,9360>
  2216. <:s><:#293,9360><+">PageBase<-">  - Offset of the virtual screen.  
  2217. <:s><:#286,9360>
  2218. <:#293,9360><+">Pattern<-"> - Pointer to the user defined pattern (16 bytes). 
  2219. <:s><:#286,9360>
  2220. <:s><:#286,9360>Mode X rectangle 4x4 pattern fill routine.
  2221. <:s><:#286,9360>
  2222. <:s><:#1151,9360>Upper left corner of pattern is always aligned to a multiple of 4 row and column. Works on all VGAs. Uses approach of copying the pattern to off-screen display memory, then loading the latches with the pattern for each scan line and filling each scan line f
  2223. our pixels at a time. Fills up to but not including the column at 
  2224. <+">EndX<-"> and the row at <+">EndY<-">. <+#>No clipping is performed<-#>.
  2225. <:s><:#286,9360>
  2226. <:s><:#579,9360><+!>WARNING:<-!> The VGA memory locations PATTERN_BUFFER (A000:FFFc) to A000:FFFF are reserved for the pattern buffer
  2227. <:s><:#286,9360>
  2228. <:s><+!>See Also:<-!> <+#>Doctor Dobbs Journal<-#> references.<:p<* >>
  2229. <:#326,9360><:f280, Times New Roman,0,0,0><+"><+!><:X11,-32768;TOC 3 "x_rect_pattern_clipped">x_rect_pattern_clipped<-!><-"><:f>
  2230. <:s><:#293,9360><-"><-!><+!>C Prototype:<-!> extern void x_rect_pattern_clipped(WORD StartX, WORD StartY, WORD EndX, 
  2231. <:s><:#286,9360>                                         WORD EndY, WORD PageBase,
  2232. <:s><:#286,9360>                                BYTE far *Pattern);
  2233. <:s><:#286,9360>
  2234. <:s><:#293,9360><+">StartX, StartY<-"> - Coordinates of upper left hand corner of the rectangle.  
  2235. <:s><:#286,9360>
  2236. <:s><:#293,9360><+">EndX, EndY<-">  - Coordinates of lower right hand corner of  the rectangle.  
  2237. <:s><:#286,9360>
  2238. <:s><:#293,9360><+">PageBase<-">  - Offset of the virtual screen.  
  2239. <:s><:#286,9360>
  2240. <:#293,9360><+">Pattern<-"> - Pointer to the user defined pattern (16 bytes). 
  2241. <:s><:#286,9360>
  2242. <:s><:#286,9360>Mode X rectangle 4x4 pattern fill routine.
  2243. <:s><:#286,9360>
  2244. <:s><:#1151,9360>Upper left corner of pattern is always aligned to a multiple of 4 row and column. Works on all VGAs. Uses approach of copying the pattern to off-screen display memory, then loading the latches with the pattern for each scan line and filling each scan line f
  2245. our pixels at a time. Fills up to but not including the column at 
  2246. <+">EndX<-"> and the row at <+">EndY<-">. <+#>Clipping is performed<-#>.
  2247. <:s><:#286,9360>
  2248. <:s><:#579,9360><+!>WARNING:<-!> The VGA memory locations PATTERN_BUFFER (A000:FFFc) to A000:FFFF are reserved for the pattern buffer
  2249. <:s><:#286,9360>
  2250. <:s><:#293,9360><+!>See Also:<-!> <+#>Doctor Dobbs Journal<-#> references.
  2251. <:s><:#286,9360>
  2252. <:s><:#286,9360>
  2253. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_rect_fill">x_rect_fill<-!><-"><:f><-">
  2254. <:s><:#293,9360><+!>C Prototype<-!>: extern void x_rect_fill(WORD StartX, WORD StartY, WORD EndX,
  2255. <:s><:#286,9360>                           WORD EndY,  WORD PageBase, WORD color);
  2256. <:s><:#286,9360>
  2257. <:s><:#293,9360><+">StartX, StartY<-"> - Coordinates of upper left hand corner of the rectangle.
  2258. <:s><:#286,9360>
  2259. <:s><:#293,9360><+">EndX, EndY<-"> - Coordinates of lower right hand corner of the rectangle.  
  2260. <:s><:#286,9360>
  2261. <:s><:#293,9360><+">PageBase<-"> - Offset of  the virtual screen.
  2262. <:s><:#286,9360>
  2263. <:s><:#293,9360><+">Color<-"> -color to use for fill
  2264. <:s><:#286,9360>
  2265. <:s><:#286,9360>Mode X rectangle solid color fill routine.  
  2266. <:s><:#286,9360>
  2267. <:#286,9360>Based on code originally published in DDJ Magazine by M. Abrash
  2268. <:s><:#286,9360>
  2269. <:s><+!>See Also:<-!> <+#>Doctor Dobbs Journal<-#> references.<:p<* >>
  2270. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_rect_fill_clipped<:X11,-32768;TOC 3 "x_rect_fill_clipped"><-"><-!><:f>
  2271. <:s><:#293,9360><+!>C Prototype<-!>: extern void x_rect_fill_clipped(WORD StartX, WORD StartY, WORD EndX,
  2272. <:s><:#286,9360>                                   WORD EndY,  WORD PageBase, WORD color);
  2273. <:s><:#286,9360>
  2274. <:s><:#293,9360><+">StartX, StartY<-"> - Coordinates of upper left hand corner of the rectangle.
  2275. <:s><:#286,9360>
  2276. <:s><:#293,9360><+">EndX, EndY<-"> - Coordinates of lower right hand corner of the rectangle.  
  2277. <:s><:#286,9360>
  2278. <:s><:#293,9360><+">PageBase<-"> - Offset of  the virtual screen.
  2279. <:s><:#286,9360>
  2280. <:s><:#293,9360><+">Color<-"> - The color to use for fill.
  2281. <:s><:#286,9360>
  2282. <:s><:#286,9360>Mode X rectangle solid color fill (With clipping) routine.
  2283. <:s><:#286,9360>
  2284. <:#286,9360>Based on code originally published in DDJ Magazine by M. Abrash
  2285. <:s><:#286,9360>
  2286. <:s><:#293,9360><+!>See Also:<-!> <+#>Doctor Dobbs Journal<-#> references.
  2287. <:s><:#286,9360>
  2288. <:s><:#286,9360>
  2289. <:s><:p<* >>
  2290. <:#333,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_cp_vid_rect">x_cp_vid_rect<-"><-!> 
  2291. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_cp_vid_rect(WORD SourceStartX, WORD SourceStartY, 
  2292. <:s><:#286,9360>                         WORD SourceEndX, WORD SourceEndY,
  2293. <:s><:#286,9360>                                WORD DestStartX, WORD DestStartY,
  2294. <:s><:#286,9360>                                        WORD SourcePageBase, WORD DestPageBase, 
  2295. <:s><:#286,9360>                                        WORD SourceBitmapWidth, WORD DestBitmapWidth);
  2296. <:s><:#286,9360>
  2297. <:s><:#293,9360><+">StartX, StartY<-">- Coordinates of  the upper left hand corner of the source rectangle.
  2298. <:s><:#286,9360>
  2299. <:s><:#293,9360><+">EndX, EndY<-"> - Coordinates of  the lower right hand corner of the source rectangle.
  2300. <:s><:#286,9360>
  2301. <:s><:#293,9360><+">DestStartX, DestStartY<-"> - Coordinates of the rectangle's destination.
  2302. <:s><:#286,9360>
  2303. <:s><:#293,9360><+">SourcePageBase<-">  - Source rectangle page offset.  
  2304. <:s><:#286,9360>
  2305. <:s><:#293,9360><+">DestPageBase<-"> - Destination rectangle's page offset.
  2306. <:s><:#286,9360>
  2307. <:s><:#579,9360><+">SourceBitmapWidth<-"> - The width of bitmap within the source virtual screen containing the source rectangle  
  2308. <:s><:#286,9360>
  2309. <:s><:#579,9360><+">DestBitmapWidth<-">  - The width of bitmap within the dest. virtual screen containing the destination rectangle
  2310. <:s><:#286,9360>
  2311. <:s><:#1151,9360>Mode X display memory to display memory copy routine. Left edge of source rectangle modulo 4 must equal left edge of destination rectangle modulo 4. Works on all VGAs. Uses approach of reading 4 pixels at a time from the source into the latches, then writin
  2312. g the latches to the destination. Copies up to but not including the column at 
  2313. <+">SrcEndX<-"> and the row at <+">SrcEndY<-">. 
  2314. <:s><:#293,9360><+#>No clipping is performed<-#>. <+!>Results are not guaranteed if the source and  destination overlap<-!>.
  2315. <:s><:#286,9360>
  2316. <:#286,9360>Based on code originally published in DDJ Magazine by M. Abrash
  2317. <:s><:#286,9360>
  2318. <:s><+!>See Also:<-!> <+#>Doctor Dobbs Journal<-#> references.<:p<* >>
  2319. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_shift_rect<:X11,-32768;TOC 3 "x_shift_rect"><-"><-!><:f>
  2320. <:s><:#293,9360><+!>C Prototype:<-!>  extern void x_shift_rect (WORD SrcLeft, WORD SrcTop, WORD SrcRight,
  2321. <:s><:#286,9360>                       WORD SrcBottom, WORD DestLeft, WORD DestTop,
  2322. <:s><:#286,9360>                       WORD ScreenOffs);
  2323. <:s><:#286,9360>
  2324. <:s><:#293,9360><+">SrcLeft, SrcTop<-"> - Coordinates of the upper left hand corner of the rectangle.
  2325. <:s><:#286,9360>
  2326. <:s><:#293,9360><+">SrcRight, SrcBottom <-">- Coordinates of the lower right hand corner of the rectangle.
  2327. <:s><:#286,9360>
  2328. <:s><:#293,9360><+">DestLeft, DestTop<-"> - Coordinates of the upper left corner of the destination.  
  2329. <:s><:#286,9360>
  2330. <:s><:#293,9360><+">ScreenOffs<-">  -  Offset of the virtual screen.
  2331. <:s><:#286,9360>
  2332. <:s><:#1716,9360>This function copies a rectangle of VRAM onto another area of  VRAM,  even if the destination overlaps with the source. It is designed for scrolling text up and down, and for moving large areas of screens around in tiling systems.  It rounds all horizontal 
  2333. coordinates to the nearest byte (4-column chunk) for the sake of speed. This means that 
  2334. <+#>it can NOT perform smooth horizontal scrolling<-#>. For that, either scroll the whole screen (minus the split screen), or copy smaller areas through system memory using the functions in the XPBITMAP module.
  2335. <:s><:#286,9360>
  2336. <:#879,9360><+">SrcRight<-"> is rounded up, and the left edges are rounded down, to ensure that the pixels pointed to by the arguments are inside the rectangle. That is, 
  2337. <+">SrcRight<-"> is treated as (<+">SrcRight<-">+3) <;><;> 2,  and 
  2338. <+">SrcLeft<-"> as <+">SrcLeft <-"><;><;> 2.
  2339. <:s><:#286,9360>
  2340. <:s><+!>NOTE:<-!> The width of the rectangle in bytes (width in pixels / 4)  cannot exceed 255.<:p<* >>
  2341. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XPAL<:X11,-32768;TOC 1 "MODULE XPAL"><-!><:f>
  2342. <:s><:#286,9360>
  2343. <:s><:#286,9360>Palette functions for VGA 256 color modes.
  2344. <:s><:#286,9360>
  2345. <:#572,9360>All the functions in this module operate on two variations of the palette buffer, the raw and annotated buffers.
  2346. <:s><:#286,9360>
  2347. <:s><:#865,9360>All those functions ending in "raw" operate on the following palette structure: 
  2348. <+">BYTE:r0,g0,b0,r1,g1,b1,...rn,gn,bn<-">   No reference to the starting color index or number of colors stored  is contained in the structure.
  2349. <:s><:#286,9360>
  2350. <:s><:#286,9360>All those functions ending in "struc" operate on the following palette structure:
  2351. <:s><:#579,9360><+">BYTE:c,BYTE:n,BYTE:r0,g0,b0,r1,g1,b1,...rn,gn,bn<-">  where<+"> c<-"> is the starting color and<+"> n<-"> is the number of colors stored
  2352. <:s><:#286,9360>
  2353. <:s><:#579,9360><+!>WARNING:<-!> <+#>There is no validity checking in these functions<-#>. The onus is on the user to supply valid parameters to the functions.
  2354. <:s><:#286,9360>
  2355. <:s><:#286,9360>
  2356. <:#286,9360><+!>SOURCES<:X11,-32768;TOC 2 "SOURCES"><-!>
  2357. <:s><:#286,9360>    xpal.asm 
  2358. <:s><:#286,9360>    xpal.inc 
  2359. <:s><:#286,9360>    xlib.inc 
  2360. <:s><:#286,9360>    model.inc
  2361. <:s><:#286,9360>
  2362. <:s><:#286,9360>
  2363. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  2364. <:s><:#286,9360>    xpal.h
  2365. <:s><:#286,9360>
  2366. <:s><:p<* >>
  2367. <:#286,9360><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!>
  2368. <:s><:#286,9360>
  2369. <:#333,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_get_pal_raw">x_get_pal_raw<-"><-!> 
  2370. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_get_pal_raw(BYTE far * pal,WORD num_clrs, WORD index);
  2371. <:s><:#286,9360>
  2372. <:#293,9360><+">pal<-"> - Pointer to a buffer to receive the raw palette.
  2373. <:s><:#286,9360>
  2374. <:s><:#293,9360><+">num_clrs<-"> - The number of colors to get.
  2375. <:s><:#286,9360>
  2376. <:s><:#293,9360><+">index <-">- Starting color number to get.
  2377. <:s><:#286,9360>
  2378. <:#286,9360>Read DAC palette into raw buffer with interrupts disabled  i.e. BYTE r1,g1,b1,r1,g2,b2...rn,gn,bn
  2379. <:s><:#286,9360>
  2380. <:s><:#293,9360><+!>WARNING:<-!> Memory for the palette buffers must all be pre-allocated.
  2381. <:s><:#286,9360><+!><+">
  2382. <:s><:#286,9360><+!><+">
  2383. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_get_pal_struc<:X11,-32768;TOC 3 "x_get_pal_struc"><-"><-!><:f>
  2384. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_get_pal_struc(BYTE far *pal, WORD num_clrs, WORD index);
  2385. <:s><:#286,9360>
  2386. <:#293,9360><+">pal<-"> - Pointer to a buffer to receive the palette structure.
  2387. <:s><:#286,9360>
  2388. <:s><:#293,9360><+">num_clrs <-">- The number of colors to get.
  2389. <:s><:#286,9360>
  2390. <:s><:#293,9360><+">index <-">- The starting color number to get.
  2391. <:s><:#286,9360>
  2392. <:#572,9360>Read DAC palette into annotated type buffer with interrupts disabled  i.e. BYTE colors to skip, BYTE colors to set, r1,g1,b1,r1,g2,b2...rn,gn,bn
  2393. <:s><:#286,9360>
  2394. <:s><:#293,9360><+!>WARNING:<-!> Memory for the palette buffers must all be pre-allocated.
  2395. <:s><:#286,9360>
  2396. <:s><:#286,9360>
  2397. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_put_pal_raw">x_put_pal_raw<-"><-!><:f>
  2398. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_put_pal_raw(BYTE far *pal, WORD num_clrs,  WORD index);
  2399. <:s><:#293,9360><+">
  2400. <:#293,9360><+">pal<-"> - Pointer to a buffer containing the raw palette.
  2401. <:s><:#286,9360>
  2402. <:s><:#293,9360><+">num_clrs<-"> - The number of colors to put.
  2403. <:s><:#286,9360>
  2404. <:s><:#293,9360><+">index <-">- Starting color number to put.
  2405. <:s><:#286,9360>
  2406. <:#572,9360>Write DAC palette from raw buffer with interrupts disabled  i.e. BYTE r1,g1,b1,r1,g2,b2...rn,gn,bn
  2407. <:s><:#286,9360>
  2408. <:s><:p<* >>
  2409. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_put_pal_struc<:X11,-32768;TOC 3 "x_put_pal_struc"><-"><-!><:f>
  2410. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_put_pal_struc(BYTE far * pal);
  2411. <:s><:#293,9360><+">
  2412. <:#293,9360><+">pal<-"> - Pointer to a buffer containing the palette structure.
  2413. <:s><:#286,9360>
  2414. <:#572,9360>Write DAC palette from annotated type buffer with interrupts disabled  i.e. BYTE colors to skip, BYTE colors to set, r1,g1,b1,r1,g2,b2...rn,gn,bn
  2415. <:s><:#286,9360>
  2416. <:s><:#286,9360>
  2417. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_set_rgb">x_set_rgb 
  2418. <-"><-!><:f>
  2419. <:s><:#293,9360><+!>C Prototype:<-!> extern x_set_rgb(BYTE color,BYTE red_c,BYTE green_c, BYTE blue_c);
  2420. <:s><:#286,9360>
  2421. <:s><:#293,9360><+">color<-"> - The color number to modify.
  2422. <:s><:#286,9360>
  2423. <:s><:#293,9360><+">red_c <-">- The red component for this color.
  2424. <:s><:#286,9360>
  2425. <:s><:#293,9360><+">green_c<-"> - The green component for this color.
  2426. <:s><:#286,9360>
  2427. <:s><:#293,9360><+">blue_c<-"> - The blue component for this color.
  2428. <:s><:#286,9360>
  2429. <:s><:#286,9360>Set the RGB components of a VGA color
  2430. <:s><:#286,9360>
  2431. <:s><:#286,9360>
  2432. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_rot_pal_struc">x_rot_pal_struc<-"><-!><:f>
  2433. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_rot_pal_struc(BYTE far * pal, WORD direction);
  2434. <:s><:#286,9360>
  2435. <:#293,9360><+">pal <-">- Pointer to the palette structure to rotate.
  2436. <:s><:#286,9360>
  2437. <:s><:#293,9360><+">direction<-"> - The direction to rotate the palette.
  2438. <:s><:#286,9360>
  2439. <:s><:#286,9360>Rotate annotated palette buffer entries. Direction 0 = backward,  1 = forward.
  2440. <:s><:#286,9360>
  2441. <:s><:#286,9360>
  2442. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_rot_pal_raw">x_rot_pal_raw<-"><-!><:f>
  2443. <:s><:#293,9360><+!>C Prototype<-!>: extern x_rot_pal_raw(BYTE far * pal, WORD direction, WORD num_colrs);
  2444. <:s><:#286,9360>
  2445. <:#293,9360><+">pal<-"> - Pointer to the raw palette buffer to rotate.
  2446. <:s><:#286,9360>
  2447. <:s><:#293,9360><+">direction<-"> - The direction to rotate the palette.
  2448. <:s><:#286,9360>
  2449. <:s><:#293,9360><+">num_colrs<-"> - The number of colors in the buffer.
  2450. <:s><:#286,9360>
  2451. <:s>Rotate a raw palette buffer. Direction 0 = backward,  1 = forward.<:p<* >>
  2452. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_put_contrast_pal_struc<:X11,-32768;TOC 3 "x_put_contrast_pal_struc"><-"><-!><:f>
  2453. <:s><:#293,9360><+!>C Prototype:<-!> extern  void x_put_contrast_pal_struc(BYTE far * pal, BYTE  intensity);
  2454. <:s><:#286,9360>
  2455. <:#293,9360><+">pal<-"> - A pointer to the palette structure to modify.
  2456. <:s><:#286,9360>
  2457. <:s><:#293,9360><+">intensity<-"> - Number of units to decrement the palette.
  2458. <:s><:#286,9360>
  2459. <:#572,9360>Write DAC palette from annotated type buffer with specified intensity  adjustment (i.e. palette entries are decremented where possible by "intensity" units).
  2460. <:s><:#286,9360>Designed for fading in or out a palette without using an intermediate working palette buffer! 
  2461. <:#286,9360>(Slow but memory efficient ... OK for small  pal structs}
  2462. <:s><:#286,9360>
  2463. <:s><:#286,9360>
  2464. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_transpose_pal_struc">x_transpose_pal_struc<-"><-!><:f>
  2465. <:s><:#293,9360><+!>C Prototype<-!>: extern void x_transpose_pal_struc(BYTE far * pal, WORD StartColor);
  2466. <:s><:#286,9360>
  2467. <:#293,9360><+">pal <-">- Pointer to the palette structure to modify.
  2468. <:s><:#286,9360>
  2469. <:s><:#293,9360><+">StartColor<-"> - Starting color index.
  2470. <:s><:#286,9360>
  2471. <:s><:#572,9360>Write DAC palette from annotated type buffer with interrupts disabled  starting at a new palette index.
  2472. <:s><:#286,9360><+!><+">
  2473. <:s><:#286,9360><+!><+">
  2474. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_cpcontrast_pal_struc">x_cpcontrast_pal_struc<-"><-!><:f>
  2475. <:#293,9360><+!>C Prototype<-!>: extern WORD x_cpcontrast_pal_struc(BYTE far *src_pal,  BYTE far *dest_pal,
  2476. <:s><:#286,9360>                             BYTE Intensity);
  2477. <:s><:#286,9360>
  2478. <:#293,9360><+">src_pal<-"> - Pointer to the source palette structure.
  2479. <:s><:#286,9360>
  2480. <:#293,9360><+">dest_pal<-"><+"> <-">- Pointer to the destination palette structure.
  2481. <:s><:#286,9360>
  2482. <:s><:#293,9360><+">Intensity<-"> - Number of units to decrement the palette.
  2483. <:s><:#286,9360>
  2484. <:s>Copy one annotated palette buffer to another making the intensity adjustment. Used in fading in and out fast and smoothly.<:p<* >>
  2485. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XLINE<:X11,-32768;TOC 1 "MODULE XLINE"><-!><:f>
  2486. <:s><:#286,9360>
  2487. <:s><:#286,9360>
  2488. <:s><:#286,9360>Line Drawing functions.
  2489. <:s><:#286,9360>
  2490. <:s><:#286,9360>
  2491. <:#286,9360><+!>SOURCES<:X11,-32768;TOC 2 "SOURCES"><-!>
  2492. <:s><:#286,9360>    xline.asm 
  2493. <:s><:#286,9360>    xline.inc 
  2494. <:s><:#286,9360>    xlib.inc 
  2495. <:s><:#286,9360>    model.inc
  2496. <:s><:#286,9360>
  2497. <:s><:#286,9360>
  2498. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  2499. <:s><:#286,9360>    xline.h
  2500. <:s><:#286,9360>
  2501. <:s><:p<* >>
  2502. <:#286,9360><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!>
  2503. <:s><:#286,9360>
  2504. <:s><:#286,9360>
  2505. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_line<:X11,-32768;TOC 3 "x_line"><-"><-!><:f>
  2506. <:s><:#293,9360><+!>C Prototype: <-!>extern void x_line(WORD x0,WORD y0,WORD x1,WORD y1, 
  2507. <:s><:#286,9360>                     WORD color,WORD PageBase);
  2508. <:s><:#286,9360>
  2509. <:s><:#293,9360><+">x0<-"> - Starting X coordinate.
  2510. <:s><:#286,9360>
  2511. <:s><:#293,9360><+">y0<-"> - Starting Y coordinate.
  2512. <:s><:#286,9360>
  2513. <:s><:#293,9360><+">x1<-"> - Ending X coordinate
  2514. <:s><:#286,9360>
  2515. <:#293,9360><+">y1 <-">- Ending Y coordinate.
  2516. <:s><:#286,9360>
  2517. <:s><:#293,9360><+">color<-"> - The color to use for the line.
  2518. <:s><:#286,9360>
  2519. <:#293,9360><+">PageBase<-"> - The page offset on which to draw the line.
  2520. <:s><:#286,9360>
  2521. <:s><:#286,9360>Draw a line with the specified end points in the specified page.
  2522. <:s><+#>No Clipping is performed<-#>.<:p<* >>
  2523. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XTEXT<:X11,-32768;TOC 1 "MODULE XTEXT"><-!><:f>
  2524. <:s><:#286,9360>
  2525. <:s><:#286,9360>
  2526. <:s><:#286,9360>Mode X text display functions.
  2527. <:s><:#286,9360>
  2528. <:s><:#286,9360>
  2529. <:#286,9360><+!>SOURCES<:X11,-32768;TOC 2 "SOURCES"><-!>
  2530. <:s><:#286,9360>    xtext.asm 
  2531. <:s><:#286,9360>    xtext.inc 
  2532. <:s><:#286,9360>    xlib.inc 
  2533. <:s><:#286,9360>    model.inc
  2534. <:s><:#286,9360>    xprintf.c
  2535. <:s><:#286,9360>
  2536. <:s><:#286,9360>
  2537. <:#286,9360><+!>C HEADER FILE<:X11,-32768;TOC 2 "C HEADER FILE"><-!>
  2538. <:s><:#286,9360>    xtext.h
  2539. <:s><:#286,9360>
  2540. <:s><:#286,9360>
  2541. <:#286,9360><+!><:X11,-32768;TOC 2 "MACROS">MACROS<-!>
  2542. <:s><:#286,9360>    FONT_8x8  0   
  2543. <:s><:#286,9360>    FONT_8x15 1   
  2544. <:s><:#286,9360>    FONT_USER 2
  2545. <:s><:#286,9360>
  2546. <:s><:#286,9360>
  2547. <:#286,9360><+!>EXPORTED VARIABLES<:X11,-32768;TOC 2 "EXPORTED VARIABLES"><-!>
  2548. <:s><:#286,9360>
  2549. <:s><:#293,9360><+!>NOTE:<-!> <+#>All variables are read only<-#>. If you modify them the results may be unpredictable.
  2550. <:s><:#286,9360>
  2551. <:s><:#293,9360><+">CharHeight<-">  BYTE - Height of current inbuilt character set.
  2552. <:s><:#286,9360>
  2553. <:s><:#293,9360><+">CharWidth<-">  BYTE - Width of current inbuilt character set.
  2554. <:s><:#286,9360>
  2555. <:s><:#293,9360><+">FirstChar<-">  BYTE - First character of current inbuilt character set.
  2556. <:s><:#286,9360>
  2557. <:s><:#293,9360><+">UserCharHeight<-">  BYTE - Height of current user character set.
  2558. <:s><:#286,9360>
  2559. <:s><:#293,9360><+">UserCharWidth<-">  BYTE - Width of current user character set.
  2560. <:s><:#286,9360>
  2561. <:s><:#293,9360><+">UserFirstCh<-">  BYTE - First character of current user character set.
  2562. <:s><:#286,9360>
  2563. <:s><:p<* >>
  2564. <:#286,9360><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!>
  2565. <:s><:#286,9360>
  2566. <:s><:#286,9360>
  2567. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_text_init">x_text_init<-"><-!><:f>
  2568. <:#293,9360><+!>C Prototype<-!>: extern WORD x_text_init( void);
  2569. <:s><:#286,9360>
  2570. <:s><:#286,9360>Initializes the Mode X text driver and sets the default font (VGA ROM 8x8)
  2571. <:s><:#286,9360>
  2572. <:s><:#286,9360>
  2573. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_set_font">x_set_font<-"><-!><:f>
  2574. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_set_font(WORD FontId);
  2575. <:s><:#286,9360>
  2576. <:s><:#293,9360><+">FontId<-"> - The font number you wish to use (See below)
  2577. <:s><:#286,9360>
  2578. <:s><:#572,9360>Select the working font where 0 = VGA ROM 8x8, 1 = VGA ROM 8x14  2 = User defined bitmapped font.
  2579. <:s><:#286,9360>
  2580. <:s><:#293,9360><+!>WARNING:<-!> A user font must be registered before setting <+">FontID<-"> to 2.
  2581. <:s><:#286,9360>
  2582. <:s><:#293,9360><+!>See Also:<-!>  Defines for this module.
  2583. <:s><:#286,9360>
  2584. <:s><:#286,9360>
  2585. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_register_userfont">x_register_userfont<-"><-!><:f>
  2586. <:#293,9360><+!>C Prototype:<-!> extern void x_register_userfont( char far *UserFontPtr);
  2587. <:s><:#286,9360>
  2588. <:s><:#293,9360><+">UserFontPtr<-"> - A pointer to the user font structure.
  2589. <:s><:#286,9360>
  2590. <:s><:#572,9360>Register a user font for later selection. Only one user font can be registered at any given time. Registering a user font deregisters the previous user font. User fonts may be at most 8 pixels wide.
  2591. <:s><:#286,9360>
  2592. <:s><:#286,9360><+!>USER FONT STRUCTURE<-!>
  2593. <:#286,9360>    Word:  ASCII code of first char in font  
  2594. <:s><:#286,9360>    Byte:  Height of chars in font  
  2595. <:s><:#286,9360>    Byte:  Width of chars in font  
  2596. <:s><:#286,9360>    n*h*Byte: the font data where n = number of chars and h = height of chars
  2597. <:s><:#286,9360>
  2598. <:s><:#579,9360><+!>WARNING:<-!> The onus is on the program to ensure that all characters drawn whilst this font is active, are within the range of characters defined.
  2599. <:s><:#286,9360>
  2600. <:s><:p<* >>
  2601. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_char_put<:X11,-32768;TOC 3 "x_put_char"><-"><-!><:f>
  2602. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_char_put(char ch,WORD X,WORD Y,WORD PgOffs,  
  2603. <:s><:#286,9360>                     WORD Color);
  2604. <:s><:#286,9360>
  2605. <:s><:#293,9360><+">ch<-"> -  Char to draw  
  2606. <:s><:#286,9360>
  2607. <:#293,9360><+">x, y <-">- Screen coordinates at which to draw ch  
  2608. <:s><:#286,9360>
  2609. <:#293,9360><+">ScrnOffs<-"> - Starting offset of page on which to draw  
  2610. <:s><:#286,9360>
  2611. <:s><:#293,9360><+">Color<-">  - Color of the text
  2612. <:s><:#286,9360>
  2613. <:s><:#286,9360>Draw a text character at the specified location with the specified color.
  2614. <:s><:#286,9360><+!>
  2615. <:s><:#293,9360><+!>WARNING:<-!> InitTextDriver must be called before using this function
  2616. <:s><:#286,9360> 
  2617. <:s><:#286,9360>
  2618. <:#333,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_printf ">x_printf<-"> 
  2619. <-!><:f>
  2620. <:s><:#293,9360><+!>C Prototype<-!>: void x_printf(int x, int y, unsigned ScrnOffs, int color, char *ln,...);
  2621. <:s><:#286,9360>
  2622. <:#293,9360><+">x, y <-">-  screen coordinates at which to draw ch  
  2623. <:s><:#286,9360>
  2624. <:#293,9360><+">ScrnOffs<-"> -  Starting offset of page on which to draw  
  2625. <:s><:#286,9360>
  2626. <:s><:#293,9360><+">Color<-">    -  Color of the text
  2627. <:s><:#286,9360>
  2628. <:s><:#293,9360><+">ln<-"> - A pointer to a text string containing formating codes.
  2629. <:s><:#286,9360>
  2630. <:s><:#293,9360>Parameters beyond <+">Color<-"> conform to the standard printf parameters.
  2631. <:s><:#286,9360>
  2632. <:s><:#286,9360>Display formated text in the specified color. 
  2633. <:s><:#286,9360>
  2634. <:s><:p<* >>
  2635. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_bgprintf">x_bgprintf<-"><-!><:f>
  2636. <:s><:#293,9360><+!>C Prototype:<-!> void x_bgprintf(int x, int y, unsigned ScrnOffs, int fgcolor, int bgcolor, char *ln,...);
  2637. <:s><:#286,9360>
  2638. <:#293,9360><+">x, y<-"> -  Screen coordinates at which to draw ch.  
  2639. <:s><:#286,9360>
  2640. <:s><:#293,9360><+">ScrnOffs<-"> -  Page offset on which to draw.  
  2641. <:s><:#286,9360>
  2642. <:s><:#293,9360><+">fgcolor<-"> -  Color of the text foreground.  
  2643. <:s><:#286,9360>
  2644. <:s><:#293,9360><+">bgcolor<-">  -  Color of the text background.
  2645. <:s><:#286,9360>
  2646. <:s><:#579,9360><+">ln<-"> - Pointer to a text string that contains formating commands that conform to the printf commands.
  2647. <:s><:#286,9360>
  2648. <:#293,9360>Parameters beyond <+">bgcolor<-"> conform to the standard printf parameters.
  2649. <:s><:#286,9360>
  2650. <:s><:#286,9360>Display formatted text in the specified foreground and background colors.
  2651. <:s><:#286,9360>
  2652. <:s><:#286,9360>
  2653. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_get_char_width">x_get_char_width<-"><-!><:f>
  2654. <:s><:#293,9360><+!>C Prototype:<-!> unsigned int x_get_char_width(char ch)
  2655. <:s><:#286,9360>
  2656. <:s><:#293,9360><+">ch <-">- Character to get the width of.
  2657. <:s><:#286,9360>
  2658. <:s><+!>Returns:<-!> The width the requested character.<:p<* >>
  2659. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XPBITMAP<:X11,-32768;TOC 1 "MODULE XPBITMAP"><-!><:f>
  2660. <+B><:s><:#286,9360>
  2661. <:s><:#286,9360>
  2662. <:s><:#572,9360>This module implements a set of functions to operate on planar bitmaps.  Planar bitmaps as used by these functions have the following structure:
  2663. <:s><:#286,9360>
  2664. <:s><:#286,9360>    BYTE 0                     The bitmap width in bytes (4 pixel groups) range 1..255  
  2665. <:s><:#286,9360>    BYTE 1                     The bitmap height in rows range 1..255  
  2666. <:s><:#286,9360>    BYTE 2..n1                 The plane 0 pixels width*height bytes  
  2667. <:s><:#286,9360>    BYTE n1..n2        The plane 1 pixels width*height bytes  
  2668. <:s><:#286,9360>    BYTE n2..n3                The plane 2 pixels width*height bytes  
  2669. <:s><:#286,9360>    BYTE n3..n4                The plane 3 pixels width*height bytes
  2670. <:s><:#286,9360>
  2671. <:#1144,9360>These functions provide the fastest possible bitmap blts from system ram to video and further, the single bitmap is applicable to all pixel alignments. The masked functions do not need separate masks since all non zero pixels are considered to be masking pi
  2672. xels,  hence if a pixel is 0 the  corresponding screen destination pixel is left unchanged.
  2673. <:s><:#286,9360>
  2674. <:s><:#286,9360>
  2675. <:#286,9360><+!>SOURCES<:X11,-32768;TOC 2 "SOURCES"><-!>
  2676. <:s><:#286,9360>    xpbitmap.asm 
  2677. <:s><:#286,9360>    xpbitmap.inc 
  2678. <:s><:#286,9360>    xlib.inc 
  2679. <:s><:#286,9360>    model.inc
  2680. <:s><:#286,9360>
  2681. <:s><:#286,9360>
  2682. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  2683. <:s><:#286,9360>    xpbitmap.h
  2684. <:s><:#286,9360>
  2685. <:s><:p<* >>
  2686. <:#286,9360><+!><:X11,-32768;TOC 2 "EXPORTED FUNCTIONS">EXPORTED FUNCTIONS<-!>
  2687. <:s><:#286,9360>
  2688. <:s><:#286,9360>
  2689. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_put_masked_pbm">x_put_masked_pbm<-"><-!><:f>
  2690. <:s><:#293,9360><+!>C Prototype<-!>: extern void x_put_masked_pbm(WORD X, WORD Y, WORD ScrnOffs, 
  2691. <:s><:#286,9360>                           BYTE far * Bitmap);
  2692. <:s><:#286,9360>
  2693. <:s><:#293,9360><+">x, y<-"> - Coordinates for the upper left corner of the bitmap.
  2694. <:s><:#286,9360>
  2695. <:s><:#293,9360><+">ScrnOffs <-">- Page offset to place the bitmap at.
  2696. <:s><:#286,9360>
  2697. <:#293,9360><+">Bitmap<-"> - Pointer to the planar bitmap structure.
  2698. <:s><:#286,9360>
  2699. <:s><:#572,9360>Mask write a planar bitmap from system ram to video ram. All zero source bitmap bytes indicate destination byte to be left unchanged.
  2700. <:s><:#286,9360><+!>
  2701. <:#293,9360><+!>NOTE<-!><+!>: <-!>Width is in bytes i.e. lots of 4 pixels
  2702. <:s><:#286,9360>
  2703. <:s><:#579,9360><+!>LIMITATIONS:<-!> <+#>No clipping is supported.<-#> Only supports bitmaps with widths which are a multiple of  4 pixels
  2704. <:s><:#286,9360>
  2705. <:s><:#293,9360><+!>See Also:<-!> XBMTOOLS module for linear <<-<;> planar bitmap conversion functions.
  2706. <:s><:#286,9360>
  2707. <:s><:#286,9360>
  2708. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_put_pbm">x_put_pbm<-"><-!><:f>
  2709. <:s><:#293,9360><+!>C Prototype<-!>: extern void x_put_pbm(WORD X, WORD Y, WORD ScrnOffs, 
  2710. <:s><:#286,9360>                     BYTE far *Bitmap);
  2711. <:s><:#286,9360>
  2712. <:s><:#293,9360><+">x, y<-"> - Coordinates for the upper left corner of the bitmap.
  2713. <:s><:#286,9360>
  2714. <:s><:#293,9360><+">ScrnOffs <-">- Page offset to place the bitmap at.
  2715. <:s><:#286,9360>
  2716. <:#293,9360><+">Bitmap<-"> - Pointer to the planar bitmap structure.
  2717. <:s><:#286,9360>
  2718. <:s><:#286,9360>Write a planar bitmap from system ram to video ram.
  2719. <:s><:#286,9360>
  2720. <:#293,9360><+!>NOTE:<-!> Width is in bytes i.e. lots of 4 pixels
  2721. <:s><:#286,9360>
  2722. <:s><:#579,9360><+!>LIMITATIONS:<-!> <+#>No clipping is supported<-#> Only supports bitmaps with widths which are a multiple of  4 pixels
  2723. <:s><:#286,9360>
  2724. <:s><:#293,9360><+!>See Also:<-!> XBMTOOLS module for linear <<-<;> planar bitmap conversion functions.
  2725. <:s><:p<* >>
  2726. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_get_pbm<:X11,-32768;TOC 3 "x_get_pbm"><-"><-!><:f>
  2727. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_get_pbm(WORD X, WORD Y,BYTE Bw,BYTE Bh, 
  2728. <:s><:#286,9360>                     WORD ScrnOffs, BYTE far * Bitmap);
  2729. <:s><:#286,9360>
  2730. <:s><:#293,9360><+">X, Y<-"> - Coordinates of the upper left  corner of the bitmap.
  2731. <:s><:#286,9360>
  2732. <:s><:#293,9360><+">Bw <-">- Width of the bitmap to get.
  2733. <:s><:#286,9360>
  2734. <:s><:#293,9360><+">Bh<-"> - Height of the bitmap to get.
  2735. <:s><:#286,9360>
  2736. <:s><:#293,9360><+">ScrnOffs<-"> - Page offset to get the bitmap from.
  2737. <:s><:#286,9360>
  2738. <:s><:#293,9360><+">Bitmap<-"> - Pointer to a buffer allocated for receiveing this bitmap.
  2739. <:s><:#286,9360>
  2740. <:s><:#286,9360>Read a planar bitmap to system ram from video ram.
  2741. <:s><:#286,9360>
  2742. <:s><:#293,9360><+!>NOTE:<-!> Width is in bytes in lots of 4 pixels
  2743. <:s><:#286,9360>
  2744. <:s><:#579,9360><+!>LIMITATIONS:<-!> No clipping is supported. Only supports bitmaps with widths which are a multiple of 4 pixels
  2745. <:s><:#286,9360>
  2746. <:s><+!>See Also:<-!> XBMTOOLS module for linear <<-<;> planar bitmap conversion functions.<:p<* >>
  2747. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XPBMCLIP<:X11,-32768;TOC 1 "MODULE XPBMCLIP"><-!><:f>
  2748. <:s><:#286,9360>
  2749. <:s><:#865,9360>This module implements a similar set of functions to operate on planar bitmaps as XPBITMAP but incorporates clipping to a user defined clipping rectangle (which is set by 
  2750. <+!><+">x_set_cliprect<-"><-!> in module XMAIN).
  2751. <:s><:#286,9360>
  2752. <:s><:#286,9360>The planar bitmap format is identical to the above module
  2753. <:s><:#286,9360>
  2754. <:#2288,9360>There are three variations of the functions in XPBITMAP in this module identified by the three function name extensions: _clipx, _clipy _clipxy.  
  2755. <+#>Because speed is critical in games programming you do not want to be checking for clipping if not necessary<-#> thus for sprites that move only  horizontally you would use the _clipx version of the put function, for sprites that move vertically you woul
  2756. d use the _clipy version and for sprites that move both directions you would use the clipxy version. Keep in mind also that 
  2757. <+#>the clipping components of these functions assume that the clipping rectangle is equal to or larger than the size of the bitmap<-#> i.e.. if a bitmap is top clipped, it is assumed that the bitmap's bottom is not also clipped. Similarly with horizontal c
  2758. lipping.
  2759. <:s><:#286,9360>
  2760. <:s><:#579,9360><+!>Note:<-!> Performance in decreasing order is as follows. _clipy,_clipx,_clipxy with masked puts being slower than unmasked puts.
  2761. <:s><:#286,9360>
  2762. <:s><:#1144,9360>Horizontal clipping is performed to byte boundaries (4 pixels) rather than  pixels. This allows for the fastest implementation of the functions. It is not such a handicap because for one, your screen width a multiple of 4 pixels wide and for most purposes i
  2763. t is the screen edges that form the  clipping rectangle.
  2764. <:s><:#286,9360>
  2765. <:s><:#286,9360>Following is an example of setting a clipping rectangle to the logical  screen edges:
  2766. <:s><:#286,9360>    x_set_cliprect(0,0,ScrnLogicalByteWidth,ScrnLogicalHeight)
  2767. <:s><:#286,9360>
  2768. <:#579,9360><+!>NOTE:<-!> The functions now return a value; 1 if clipped image is fully clipped (i.e. no portion of it      appears on the screen) otherwise it returns 0
  2769. <:s><:#286,9360>
  2770. <:s><:#286,9360>
  2771. <:#286,9360><+!>SOURCES<:X11,-32768;TOC 2 "SOURCES"><-!>
  2772. <:s><:#286,9360>    xpbmclip.asm 
  2773. <:s><:#286,9360>    xpbmclip.inc 
  2774. <:s><:#286,9360>    xlib.inc 
  2775. <:s><:#286,9360>    model.inc
  2776. <:s><:#286,9360>
  2777. <:s><:#286,9360>
  2778. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  2779. <:s><:#286,9360>    xpbmclip.h
  2780. <:s><:#286,9360>
  2781. <:s><:#286,9360>
  2782.   <:p<* >><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!>
  2783. <:s><:#286,9360>
  2784. <:s><:#286,9360>
  2785. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_put_masked_pbm_clipx">x_put_masked_pbm_clipx<-"><-!><:f>
  2786. <:s><:#293,9360><+!>C Prototype<-!>: extern void x_put_masked_pbm_clipx(WORD X, WORD Y, WORD ScrnOffs, 
  2787. <:s><:#286,9360>                                BYTE far * Bitmap);
  2788. <:s><:#286,9360>
  2789. <:s><:#293,9360><+">x, y<-"> - Coordinates for the upper left corner of the bitmap.
  2790. <:s><:#286,9360>
  2791. <:s><:#293,9360><+">ScrnOffs <-">- Page offset to place the bitmap at.
  2792. <:s><:#286,9360>
  2793. <:#293,9360><+">Bitmap<-"> - A far pointer to the planar bitmap structure.
  2794. <:s><:#286,9360>
  2795. <:s><:#572,9360>Mask write a planar bitmap from system ram to video ram. Horizontal clipping is performed. All zero source bitmap bytes indicate destination byte to be left unchanged.
  2796. <:s><:#286,9360><+!>
  2797. <:#293,9360><+!>NOTE<-!><+!>: <-!>Width is in bytes i.e. lots of 4 pixels
  2798. <:s><:#286,9360>
  2799. <:s><:#293,9360><+!>LIMITATIONS:<-!> Only supports bitmaps with widths which are a multiple of  4 pixels
  2800. <:s><:#286,9360>
  2801. <:s><:#293,9360><+!>See Also:<-!> XBMTOOLS module for linear <<-<;> planar bitmap conversion functions.
  2802. <:s><:#286,9360>
  2803. <:s><:#286,9360>
  2804. <:#326,9360><-!><-"><:f280, Times New Roman,0,0,0><+!><+">x_put_masked_pbm_clipy<:X11,-32768;TOC 3 "x_put_masked_pbm_clipy"><-"><-!><:f>
  2805. <:s><:#293,9360><+!>C Prototype<-!>: extern void x_put_masked_pbm_clipy(WORD X, WORD Y, WORD ScrnOffs, 
  2806. <:s><:#286,9360>                                BYTE far * Bitmap);
  2807. <:s><:#286,9360>
  2808. <:s><:#293,9360><+">x, y<-"> - Coordinates for the upper left corner of the bitmap.
  2809. <:s><:#286,9360>
  2810. <:s><:#293,9360><+">ScrnOffs <-">- Page offset to place the bitmap at.
  2811. <:s><:#286,9360>
  2812. <:#293,9360><+">Bitmap<-"> - A far pointer to the planar bitmap structure.
  2813. <:s><:#286,9360>
  2814. <:#572,9360>Mask write a planar bitmap from system ram to video ram. Vertical clipping is performed. All zero source bitmap bytes indicate destination byte to be left unchanged.
  2815. <:s><:#286,9360><+!>
  2816. <:#293,9360><+!>NOTE<-!><+!>: <-!>Width is in bytes i.e. lots of 4 pixels
  2817. <:s><:#286,9360>
  2818. <:s><:#293,9360><+!>LIMITATIONS:<-!> Only supports bitmaps with widths which are a multiple of  4 pixels
  2819. <:s><:#286,9360>
  2820. <:s><:#293,9360><+!>See Also:<-!> XBMTOOLS module for linear <<-<;> planar bitmap conversion functions.
  2821. <:s><:#326,9360><+!><+"><:f280, Times New Roman,0,0,0>
  2822. <:s><+!><+"><:f280, Times New Roman,0,0,0><:p<* >>
  2823. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_put_masked_pbm_clipxy<:X11,-32768;TOC 3 "x_put_masked_pbm_clipxy"><-"><-!><:f>
  2824. <:s><:#293,9360><+!>C Prototype<-!>: extern void x_put_masked_pbm_clipxy(WORD X, WORD Y, WORD ScrnOffs, 
  2825. <:s><:#286,9360>                                 BYTE far * Bitmap);
  2826. <:s><:#286,9360>
  2827. <:s><:#293,9360><+">x, y<-"> - Coordinates for the upper left corner of the bitmap.
  2828. <:s><:#286,9360>
  2829. <:s><:#293,9360><+">ScrnOffs <-">- Page offset to place the bitmap at.
  2830. <:s><:#286,9360>
  2831. <:#293,9360><+">Bitmap<-"> - A far pointer to the planar bitmap structure.
  2832. <:s><:#286,9360>
  2833. <:#572,9360>Mask write a planar bitmap from system ram to video ram. Both horizontal and vertical clipping is performed. All zero source bitmap bytes indicate destination byte to be left unchanged.
  2834. <:s><:#286,9360><+!>
  2835. <:#293,9360><+!>NOTE<-!><+!>: <-!>Width is in bytes i.e. lots of 4 pixels
  2836. <:s><:#286,9360>
  2837. <:s><:#293,9360><+!>LIMITATIONS:<-!> Only supports bitmaps with widths which are a multiple of  4 pixels
  2838. <:s><:#286,9360>
  2839. <:s><:#293,9360><+!>See Also:<-!> XBMTOOLS module for linear <<-<;> planar bitmap conversion functions.
  2840. <:s><:#326,9360><+!><+"><:f280, Times New Roman,0,0,0>
  2841. <:s><:#326,9360><+!><+"><:f280, Times New Roman,0,0,0>
  2842. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_put_pbm<-"><-!><+!><+">_clipx<:X11,-32768;TOC 3 "x_put_pbm_clipx"><-"><-!><:f>
  2843. <:s><:#293,9360><+!>C Prototype<-!>: extern void x_put_pbm_clipx(WORD X, WORD Y, WORD ScrnOffs, 
  2844. <:s><:#286,9360>                              BYTE far *Bitmap);
  2845. <:s><:#286,9360>
  2846. <:s><:#293,9360><+">x, y<-"> - Coordinates for the upper left corner of the bitmap.
  2847. <:s><:#286,9360>
  2848. <:s><:#293,9360><+">ScrnOffs <-">- Page offset to place the bitmap at.
  2849. <:s><:#286,9360>
  2850. <:#293,9360><+">Bitmap<-"> - A far pointer to the planar bitmap structure.
  2851. <:s><:#286,9360>
  2852. <:s><:#286,9360>Write a planar bitmap from system ram to video ram. Horizontal clipping is performed.
  2853. <:s><:#286,9360>
  2854. <:#293,9360><+!>NOTE:<-!> Width is in bytes i.e. lots of 4 pixels
  2855. <:s><:#286,9360>
  2856. <:s><:#293,9360><+!>LIMITATIONS:<-!> Only supports bitmaps with widths which are a multiple of  4 pixels
  2857. <:s><:#286,9360>
  2858. <:s><:#293,9360><+!>See Also:<-!> XBMTOOLS module for linear <<-<;> planar bitmap conversion functions.
  2859. <:s><:p<* >>
  2860. <:#326,9360><+!><+"><:f280, Times New Roman,0,0,0>x_put_pbm<-"><-!><:f><+!><+">_clipy<:X11,-32768;TOC 3 "x_put_pbm_clipy"><-"><-!>
  2861. <:s><:#293,9360><+!>C Prototype<-!>: extern void x_put_pbm_clipy(WORD X, WORD Y, WORD ScrnOffs, 
  2862. <:s><:#286,9360>                              BYTE far *Bitmap);
  2863. <:s><:#286,9360>
  2864. <:s><:#293,9360><+">x, y<-"> - Coordinates for the upper left corner of the bitmap.
  2865. <:s><:#286,9360>
  2866. <:s><:#293,9360><+">ScrnOffs <-">- Page offset to place the bitmap at.
  2867. <:s><:#286,9360>
  2868. <:#293,9360><+">Bitmap<-"> - A far pointer to the planar bitmap structure.
  2869. <:s><:#286,9360>
  2870. <:#286,9360>Write a planar bitmap from system ram to video ram. Vertical clipping is performed.
  2871. <:s><:#286,9360>
  2872. <:#293,9360><+!>NOTE:<-!> Width is in bytes i.e. lots of 4 pixels
  2873. <:s><:#286,9360>
  2874. <:s><:#293,9360><+!>LIMITATIONS:<-!> Only supports bitmaps with widths which are a multiple of  4 pixels
  2875. <:s><:#286,9360>
  2876. <:s><:#293,9360><+!>See Also:<-!> XBMTOOLS module for linear <<-<;> planar bitmap conversion functions.
  2877. <:s><:#286,9360>
  2878. <:s><:#286,9360>
  2879. <:#326,9360><+!><+"><:f280, Times New Roman,0,0,0>x_put_pbm<-"><-!><:f><+!><+">_clipxy<:X11,-32768;TOC 3 "x_put_pbm_clipxy"><-"><-!>
  2880. <:s><:#293,9360><+!>C Prototype<-!>: extern void x_put_pbm_clipxy(WORD X, WORD Y, WORD ScrnOffs, 
  2881. <:s><:#286,9360>                                BYTE far *Bitmap);
  2882. <:s><:#286,9360>
  2883. <:s><:#293,9360><+">x, y<-"> - Coordinates for the upper left corner of the bitmap.
  2884. <:s><:#286,9360>
  2885. <:s><:#293,9360><+">ScrnOffs <-">- Page offset to place the bitmap at.
  2886. <:s><:#286,9360>
  2887. <:#293,9360><+">Bitmap<-"> - A far pointer to the planar bitmap structure.
  2888. <:s><:#286,9360>
  2889. <:#572,9360>Write a planar bitmap from system ram to video ram. Both horizontal and vertical clipping is performed.
  2890. <:s><:#286,9360>
  2891. <:#293,9360><+!>NOTE:<-!> Width is in bytes i.e. lots of 4 pixels
  2892. <:s><:#286,9360>
  2893. <:s><:#293,9360><+!>LIMITATIONS:<-!> Only supports bitmaps with widths which are a multiple of  4 pixels
  2894. <:s><:#286,9360>
  2895. <:s><:#293,9360><+!>See Also:<-!> XBMTOOLS module for linear <<-<;> planar bitmap conversion functions.
  2896. <:s><:p<* >>
  2897. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE  XCBITMAP<:X11,-32768;TOC 1 "MODULE  XCBITMAP"><-!><:f>
  2898. <:s><:#286,9360>
  2899. <:s><:#286,9360>
  2900. <:#572,9360>Compiled bitmap functions. See "The care and feeding of compiled masked blits." in the reference section for more details on compiled bitmaps.
  2901. <:s><:#286,9360>
  2902. <:s><:#286,9360>
  2903. <:#286,9360><+!><:X11,-32768;TOC 2 "SOURCES">SOURCES<-!>
  2904. <:#293,9360><+!>    <-!>xcbitmap.asm
  2905. <:#286,9360>    xcbitmap.inc
  2906. <:s><:#286,9360>
  2907. <:s><:#286,9360>
  2908. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  2909.     xcbitmap.h<:p<* >>
  2910. <:#286,9360><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!>
  2911. <:s><:#286,9360><+!>
  2912. <:s><:#286,9360><+!>
  2913. <:#326,9360><+!><+"><:f280, Times New Roman,0,0,0><:X11,-32768;TOC 3 "x_compile_bitmap">x_compile_bitmap<:f><-">
  2914. <:#293,9360><+!>C Prototype:  <-!>int x_compile_bitmap( WORD lsw, char far *bitmap, char far *output );
  2915. <:s><:#286,9360>
  2916. <:s><:#293,9360><+">lsw<-"> - The logical screen width in bytes.
  2917. <:s><:#286,9360>
  2918. <:s><:#293,9360><+">bitmap<-"> - A pointer to the source linear bitmap.
  2919. <:s><:#286,9360>
  2920. <:s><:#293,9360><+">output<-"> - A pointer to a buffer set up to receive the compiled bitmap.
  2921. <:s><:#286,9360>
  2922. <:s><:#293,9360><+!>Returns: <-!>The size of the compiled bitmap in bytes.
  2923. <:s><:#286,9360>
  2924. <:s><:#572,9360>Compiles a linear bitmap to generate machine code to plot it at any required screen coordinates FAST!
  2925. <:s><:#286,9360>
  2926. <:s><:#286,9360>
  2927. <:#326,9360><+!><+"><:f280, Times New Roman,0,0,0><:X11,-32768;TOC 3 "x_sizeof_cbitmap">x_sizeof_cbitmap<:f><-"><-!>
  2928. <:s><:#293,9360><+!>C Prototype: <-!> int x_sizeof_cbitmap( WORD lsw, char far *bitmap );
  2929. <:s><:#286,9360>
  2930. <:s><:#293,9360><+">lsw<-"> - The logical screen width in bytes.
  2931. <:s><:#286,9360>
  2932. <:s><:#293,9360><+">bitmap<-"> - A pointer to the source linear bitmap.
  2933. <:s><:#286,9360>
  2934. <:s><:#293,9360><+!>Returns: <-!> The space in bytes required to hold the compiled bitmap.
  2935. <:s><:#286,9360>
  2936. <:s><:#286,9360>
  2937. <:#326,9360><+!><+"><:f280, Times New Roman,0,0,0><:X11,-32768;TOC 3 "x_put_cbitmap">x_put_cbitmap<:f><-"><-!>
  2938. <:s><:#293,9360><+!>C Prototype:  <-!>void x_put_cbitmap( int X, int Y, unsigned int PageOffset, char far *bitmap);
  2939. <:s><:#286,9360>
  2940. <:s><:#293,9360><+">X, Y<-"> - The coordinates at which to place the compiled bitmaps.
  2941. <:s><:#286,9360>
  2942. <:s><:#293,9360><+">PageOffset<-"> - The page offset on which to draw the bitmap.
  2943. <:s><:#286,9360>
  2944. <:s><:#293,9360><+">bitmap<-"> - A pointer to the compiled bitmap.
  2945. <:s><:#286,9360>
  2946. <:s><:#293,9360>Displays a bitmap generated by <+!><+">x_compile_bitmap<-!><-">.<-">
  2947. <:s><:#286,9360>
  2948. <:s><:#286,9360>
  2949. <:s><:#286,9360>
  2950. <:s><:p<* >>
  2951. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XCOMPPBM<:X11,-32768;TOC 1 "MODULE XCOMPPBM"><-!><:f>
  2952. <:s><:#286,9360>
  2953. <:s><:#286,9360>
  2954. <:#286,9360>Identical to XCBITMAP except that the source bitmaps are the PBM form rather than LBM.
  2955. <:s><:#286,9360>
  2956. <:s><:#286,9360>
  2957. <:#286,9360><+!><:X11,-32768;TOC 2 "SOURCES">SOURCES<-!>
  2958. <:#286,9360>    xcompbm.asm
  2959. <:#286,9360>    xcompbm.inc
  2960. <:s><:#286,9360>
  2961. <:s><:#286,9360><+!>
  2962. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  2963. <+!>    <-!>xcompbm.h<:p<* >>
  2964. <:#286,9360><+!>EXPORTED <-!><+!>FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!>
  2965. <:s><:#286,9360>
  2966. <:s><:#286,9360>
  2967. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_compile_pbm">x_compile_pbm<-"><-!><:f>
  2968. <:s><:#293,9360><+!>C Prototype: <-!> x_compile_pbm( WORD lsw, char far *bitmap, char far *output );
  2969. <:s><:#286,9360>
  2970. <:s><:#293,9360><+">lsw<-"> - The logical screen width in bytes.
  2971. <:s><:#286,9360>
  2972. <:s><:#293,9360><+">bitmap<-"> - A pointer to the source planar bitmap.
  2973. <:s><:#286,9360>
  2974. <:s><:#293,9360><+">output<-"> - A far pointer to a buffer set up to receive the compiled bitmap.
  2975. <:s><:#286,9360>
  2976. <:s><:#293,9360><+!>Returns: <-!>The size of the compiled bitmap in bytes.
  2977. <:s><:#286,9360>
  2978. <:s><:#572,9360>Compiles a planar bitmap to generate machine code to plot it at any required screen coordinates FAST!
  2979. <:s><:#286,9360>
  2980. <:s><:#286,9360>
  2981. <:#326,9360><+!><+"><:f280, Times New Roman,0,0,0>x_sizeof_cpbm<:X11,-32768;TOC 3 "x_sizeof_cpbm"><:f><-"><-!>
  2982. <:s><:#293,9360><+!>C Prototype: <-!> int x_sizeof_cpbm( WORD lsw, char far *bitmap );
  2983. <:s><:#286,9360>
  2984. <:s><:#293,9360><+">lsw<-"> - The logical screen width in bytes.
  2985. <:s><:#286,9360>
  2986. <:s><:#293,9360><+">bitmap<-"> - A far pointer to the source planar bitmap.
  2987. <:s><:#286,9360>
  2988. <:s><:#293,9360><+!>Returns: <-!> The space in bytes required to hold the compiled bitmap.
  2989. <:s><:#286,9360>
  2990. <:s><:p<* >>
  2991. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XVBITMAP<:X11,-32768;TOC 1 "MODULE XVBITMAP"><-!><:f>
  2992. <:s><:#286,9360>
  2993. <:s><:#286,9360>
  2994. <:#1430,9360>The XVBITMAP module implements yet another type of bitmap to complement planar and compiled bitmaps, VRAM based bitmaps. If a 4 cylinder car is analogous to planar bitmaps, that is thrifty on memory consumption but low performance and a V8 is analogous to C
  2995. ompiled bitmaps, memory guzzlers that really fly, then VRAM based bitmaps are the 6 cylinder modest performers with acceptable memory consumption.
  2996. <:s><:#286,9360>
  2997. <:#858,9360>To summarize their selling points, VBM's are moderately fast with fair memory consumption, and unlike compiled bitmaps, can be clipped. The disadvantages are that they are limited by the amount of free video ram and have a complex structure.
  2998. <:s><:#286,9360>
  2999. <:#1151,9360>The VRAM bitmap format is rather complex consisting of components stored in video ram and components in system ram working together. This complexity necessitates the existence of a creation function 
  3000. <+!><+">x_make_vbm<-"><-!> which takes an input linear bitmap and generates the equivalent VBM (VRAM Bit Map).
  3001. <:s><:#286,9360>
  3002. <:s><:#286,9360>VBM structure:
  3003. <:s><:#286,9360>          WORD  0   Size          Total size of this VBM structure in bytes      
  3004. <:#286,9360>          WORD  1   ImageWidth    Width in bytes of the image (for all alignments)      
  3005. <:#286,9360>          WORD  2   ImageHeight   Height in scan lines of the image
  3006. <:#286,9360>          WORD  3   Alignment 0  ImagePtr  Offset in VidRAM of this aligned image  
  3007. <:#286,9360>          WORD  4               MaskPtr   Offset (within this structure's DS) of alignment masks
  3008. <:s><:#286,9360>    WORD  9   Alignment 3  ImagePtr  Offset in VidRAM of this aligned image  
  3009. <:s><:#286,9360>    WORD 10               MaskPtr   Offset (within this structure's DS) of alignment masks
  3010. <:s><:#286,9360>    BYTE   21 (WORD 11)  
  3011. <:s><:#286,9360>                    Image masks for alignment 0 
  3012. <:#286,9360>    BYTE  21 + ImageWidth*ImageHeight       
  3013. <:#286,9360>                    (similarly for alignments 1 - 2 )
  3014. <:#286,9360>    BYTE  21 + 3*ImageWidth*ImageHeight + 1 
  3015. <:s><:#286,9360>                    Image masks for alignment 3
  3016. <:#286,9360>    BYTE  21 + 4*(ImageWidth*ImageHeight)  
  3017. <:s><:#286,9360>                    Similarly for alignments 2 and 3
  3018. <:s><:#286,9360>    BYTE 21 + 4*(ImageWidth*ImageHeight)
  3019. <:#286,9360>                    (And don't forget the corresponding data in video ram)
  3020. <:s><:#286,9360>
  3021. <:s><:#286,9360>
  3022. You can see for yourself the complexity of this bitmap format. The image is stored in video ram in its 4 different alignments with pointers to these alignments in the VBM. Similarly there are 4 alignments of the corresponding masks within the VBM itself (to
  3023. wards the end). The mask bytes contain the plane settings for the corresponding video bytes so that one memory move can move up to 4 pixels at a time (depending on the mask settings) using the VGA's latches, theoretically giving you a 4x speed improvement o
  3024. ver conventional blits like the ones implemented in "XPBITMAP". In actual fact its anywhere between 2 and 3 due to incurred overheads. 
  3025. <:p<* >>
  3026. <:#2002,9360>These bitmaps are more difficult to store in files than PBM'S and CBM's but still possible with a bit of work, so do not dismiss these as too difficult to use. Consider all the bitmap formats carefully before deciding on which to use. There may even be situ
  3027. ations that a careful application of all three types would be most effective i.e.. compiled bitmaps for Background tiles and the main game character (which never need clipping), VRAM based bitmaps for the most frequently occurring (opponent, alien etc.) cha
  3028. racters which get clipped as they come into and leave your current location and planar bitmaps for smaller or less frequently encountered characters.
  3029. <:s><:#286,9360>
  3030. <:s><:#286,9360>
  3031. <:#286,9360><+!>SOURCES<:X11,-32768;TOC 2 "SOURCES"><-!>
  3032. <:#286,9360>    xvbitmap.asm 
  3033. <:#286,9360>    xvbitmap.inc 
  3034. <:s><:#286,9360>    xlib.inc model.inc    
  3035. <:#286,9360>    xmakevbm.c  
  3036. <:s><:#286,9360>
  3037. <:s><:#286,9360>
  3038. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  3039. <:#286,9360>    xvbitmap.h
  3040. <:s><:#286,9360>
  3041. <:s><:p<* >>
  3042. <:#286,9360><+!><:X11,-32768;TOC 2 "EXPORTED FUNCTIONS">EXPORTED FUNCTIONS<-!>
  3043. <:s><:#286,9360>
  3044. <:s><:#286,9360>
  3045. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_make_vbm">x_make_vbm<-"><-!><:f>
  3046. <:#293,9360><+!>C Prototype:<-!> extern char far * x_make_vbm( char far *lbm, WORD *VramStart);
  3047. <:s><:#286,9360>
  3048. <:#293,9360><+">lbm - <-">A far pointer to the input linear bitmap   
  3049. <:s><:#286,9360>
  3050. <:#293,9360><+">VramStart<-"> - Pointer to variable containing Offset of first free VRAM byte
  3051. <:s><:#286,9360>
  3052. <:s><:#1158,9360>Create the VBM from the given linear bitmap and place the image alignments  in video ram starting at the offset in the variable pointed to by 
  3053. <+">VramStart<-">. <+">VramStart<-"> is then updated to point to the next free VRAM byte (just after the last byte of the image alignments). Usually you will point 
  3054. <+">VramStart<-"> to <+">NonVisual_Offs<-">.
  3055. <:s><:#286,9360>
  3056. <:s><:#286,9360>
  3057. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_put_masked_vbm<:X11,-32768;TOC 3 "x_put_masked_vbm"> 
  3058. <-"><-!><:f>
  3059. <:#293,9360><+!>C Prototype:<-!> extern int x_put_masked_vbm( int X, int Y, WORD ScrnOffs, 
  3060. <:#286,9360>                         BYTE far *VBitmap);
  3061. <:s><:#286,9360>
  3062. <:s><:#293,9360><+">X, Y <-">- Coordinates to draw the bitmap at.
  3063. <:s><:#286,9360>
  3064. <:s><:#293,9360><+">ScrnOffs<-"> - The page offset to draw the bitmap at.
  3065. <:s><:#293,9360><+">
  3066. <:#293,9360><+">VBitmap<-"> - A far pointer to the video bitmap.
  3067. <:s><:#286,9360>
  3068. <:#832,9360><+!>Returns:<-!> 1 if clipped image is fully clipped (i.e. no portion of it appears on the screen) otherwise it returns 0. 
  3069. <:f200, NewsGothic,0,0,0>(Editors note: since this function doesn't support clipping the return value should be 0 at all times.)<:f>
  3070. <:s><:#286,9360>
  3071. <:s><:#293,9360>Draw a VRAM based bitmap at (X,Y) relative to the screen with starting  offset 
  3072. <+">ScrnOffs<-">.
  3073. <:s><:p<* >>
  3074. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_put_masked_vbm_clipx">x_put_masked_vbm_clipx<-!><-"><:f>
  3075. <:#293,9360><-!><+!>C Prototype:<-!> extern int x_put_masked_vbm_clipx(int X, int Y, WORD ScrnOffs, 
  3076. <:s><:#286,9360>                                  BYTE far *VBitmap);
  3077. <:s><:#286,9360>
  3078. <:s><:#293,9360><+">X, Y <-">- Coordinates to draw the bitmap at.
  3079. <:s><:#286,9360>
  3080. <:s><:#293,9360><+">ScrnOffs<-"> - The page offset to draw the bitmap at.
  3081. <:s><:#286,9360>
  3082. <:s><:#293,9360><+">VBitmap<-"> - A far pointer to the video bitmap.
  3083. <:s><:#286,9360>
  3084. <:s><:#293,9360><+!>Returns:<-!> 1 if clipped image is fully clipped otherwise it returns 0.
  3085. <:s><:#286,9360>
  3086. <:#579,9360>Draw a VRAM based bitmap at (X,Y) relative to the screen with starting  offset 
  3087. <+">ScrnOffs. <-">Horizontal clipping is performed.
  3088. <:s><:#286,9360>
  3089. <:s><:#286,9360>
  3090. <:#286,9360><+"><+!>x_put_masked_vbm_clipy<:X11,-32768;TOC 3 "x_put_masked_vbm_clipy"><-!><-">
  3091. <:#293,9360><-!><+!>C Prototype:<-!> extern int x_put_masked_vbm_clipy( int X, int Y, WORD ScrnOffs, 
  3092. <:s><:#286,9360>                                  BYTE far *VBitmap);
  3093. <:s><:#286,9360>
  3094. <:s><:#293,9360><+">X, Y <-">- Coordinates to draw the bitmap at.
  3095. <:s><:#286,9360>
  3096. <:s><:#293,9360><+">ScrnOffs<-"> - The page offset to draw the bitmap at.
  3097. <:s><:#286,9360>
  3098. <:s><:#293,9360><+">VBitmap<-"> - A far pointer to the video bitmap.
  3099. <:s><:#286,9360>
  3100. <:#579,9360><+!>Returns:<-!> 1 if clipped image is fully clipped (i.e. no portion of it appears on the screen) otherwise it returns 0
  3101. <:s><:#286,9360>
  3102. <:s><:#293,9360>Draw a VRAM based bitmap at (X,Y) relative to the screen with starting offset 
  3103. <+">ScrnOffs<-">.
  3104. <:#286,9360>Vertical clipping is performed.
  3105. <:s><:p<* >>
  3106. <:#326,9360><:f280, Times New Roman,0,0,0><+"><+!>x_put_masked_vbm_clipxy<:X11,-32768;TOC 3 "x_put_masked_vbm_clipxy"><-"><-!><:f>
  3107. <:#293,9360><+!>C Prototype:<-!> extern int x_put_masked_vbm_clipxy( int X, int Y, WORD ScrnOffs, 
  3108. <:s><:#286,9360>                                    BYTE far *VBitmap);
  3109. <:s><:#286,9360>
  3110. <:s><:#293,9360><+">X, Y <-">- Coordinates to draw the bitmap at.
  3111. <:s><:#286,9360>
  3112. <:s><:#293,9360><+">ScrnOffs<-"> - The page offset to draw the bitmap at.
  3113. <:s><:#286,9360>
  3114. <:s><:#293,9360><+">VBitmap<-"> - A far pointer to the video bitmap.
  3115. <:s><:#286,9360>
  3116. <:#579,9360><+!>Returns:<-!> 1 if clipped image is fully clipped (i.e. no portion of it appears on the screen) otherwise it returns 0
  3117. <:s><:#286,9360>
  3118. <:s><:#293,9360>Draw a VRAM based bitmap at (X,Y) relative to the screen with starting  offset 
  3119. <+">ScrnOffs<-">.
  3120. <:#286,9360>Both horizontal and vertical clipping is performed.
  3121. <:s><:#286,9360>
  3122. <:s><:#286,9360>
  3123. <:s>See XPBMCLIP for more details on the type of clipping used as it is identical to XVBITMAP.<:p<* >>
  3124. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE  XMOUSE<:X11,-32768;TOC 1 "MODULE  XMOUSE"><-!><:f>
  3125. <:s><:#286,9360>
  3126. <:s><:#1144,9360>The XMOUSE module implements very basic mouse handling functions. The way in which it operates is by installing an event handler function during initialization which subsequently intercepts and processes mouse events and automatically updates status variabl
  3127. es such as mouse position and button pressed status. 
  3128. <:s><:#286,9360>
  3129. <:s><:#286,9360>It does not support the full functionality of:
  3130. <:s><:#286,9360>    SPLIT SCREENS,  SCROLLED WINDOWS, or   VIRTUAL WINDOWS
  3131. <:#858,9360>This was done to primarily prevent unnecessary impedences to performance, since the mouse handler function has the potential to degrade performance. It also saves me a lot of coding which I was too lazy to do.
  3132. <:s><:#286,9360>
  3133. <:s><:#1144,9360>Programs communicate with the mouse driver as with other devices, through an interrupt vector namely 33h. On generating an interrupt, the mouse driver expects a function number in AX and possibly other parameters in other registers and returns information v
  3134. ia the registers. A brief description of the mouse functions follows:
  3135. <:s><:#286,9360>
  3136. <:#286,9360><+!><+#><:X11,-32768;TOC 2 "MS Mouse Driver Functions">MS Mouse Driver Functions<-#><-!>
  3137. <:s><:#286,9360>Mouse Initialization                     0
  3138. <:s><:#286,9360>Show Cursor                                  1
  3139. <:s><:#286,9360>Hide Cursor                                  2
  3140. <:s><:#286,9360>Get Mouse Position & Button Status  3
  3141. <:s><:#286,9360>Set Mouse Cursor Position                4
  3142. <:s><:#286,9360>Get Button Press Information             5
  3143. <:s><:#286,9360>Get Button Release Information           6
  3144. <:s><:#286,9360>Set Min/Max Horizontal Position          7
  3145. <:s><:#286,9360>Set Min/Max Vertical Position            8
  3146. <:s><:#286,9360>Define Graphics Cursor Block             9
  3147. <:s><:#286,9360>Define Text Cursor                      10
  3148. <:s><:#286,9360>Read Mouse Motion Counters              11
  3149. <:s><:#286,9360>Define Event Handler                    12
  3150. <:s><:#286,9360>Light Pen Emulation Mode ON             13
  3151. <:s><:#286,9360>Light Pen Emulation Mode OFF            14
  3152. <:s><:#286,9360>Set Mouse Mickey/Pixel Ratio            15
  3153. <:s><:#286,9360>Conditional Hide Cursor                 16
  3154. <:s><:#286,9360>Set Double-Speed Threshold              19
  3155. <:s><:#286,9360>
  3156. <:s><:#286,9360>
  3157. In practice only a few of these functions are used and even fewer when the mouse status is monitored by an event handler function such as is used in this module.<:p<* >>
  3158. <:#1151,9360>The most important thing to note when using the mouse module is that the mouse event handler must be removed before exiting the program. It is a good idea to have an exit function (see the C 
  3159. <+!><+">atexit<-"><-!> function) and include the line <+!><+">x_mouse_remove<-"><-!>(); along with any other pre-exit cleanup code.
  3160. <:s><:#286,9360>
  3161. <:s><:#286,9360>
  3162. <:#286,9360><+!>SOURCES<:X11,-32768;TOC 2 "SOURCES"><-!>
  3163. <:#286,9360>    xmouse.asm 
  3164. <:s><:#286,9360>    xlib.inc 
  3165. <:s><:#286,9360>    model.inc
  3166. <:s><:#286,9360>
  3167. <:s><:#286,9360>
  3168. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  3169. <:#286,9360>    xmouse.h
  3170. <:s><:#286,9360>
  3171. <:s><:#286,9360>
  3172. <:#286,9360><+!><:X11,-32768;TOC 2 "EXPORTED VARIABLES">EXPORTED VARIABLES<-!>
  3173. <:s><:#286,9360>
  3174. <:#293,9360><+">MouseInstalled <-"> WORD - Indicates whether mouse handler installed   
  3175. <:s><:#286,9360>
  3176. <:#293,9360><+">MouseHidden<-">  WORD - Indicates whether mouse cursor is hidden 
  3177. <:s><:#286,9360>
  3178. <:#293,9360><+">MouseButtonStatus<-"> WORD - Holds the mouse button status   
  3179. <:s><:#286,9360>
  3180. <:#293,9360><+">MouseX<-">  WORD - Current X position of mouse cursor   
  3181. <:s><:#286,9360>
  3182. <:#293,9360><+">MouseY<-">  WORD - Current Y position of mouse cursor   
  3183. <:s><:#286,9360>
  3184. <:#293,9360><+">MouseFrozen<-">  WORD - Disallows position updates if TRUE   
  3185. <:s><:#286,9360>
  3186. <:#293,9360><+">MouseColor<-">  BYTE - The mouse cursors color
  3187. <:s><:#286,9360>
  3188. <:s><:p<* >>
  3189. <:#286,9360><+!><:X11,-32768;TOC 2 "EXPORTED FUNCTIONS">EXPORTED FUNCTIONS<-!>
  3190. <:s><:#286,9360>
  3191. <:s><:#286,9360>
  3192. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_mouse_init<:X11,-32768;TOC 3 "x_mouse_init"><-"><-!><:f>
  3193. <:s><:#293,9360><+!>C Prototype<-!>:  int x_mouse_init()
  3194. <:s><:#286,9360>
  3195. <:s><:#858,9360>Initialize the mouse driver functions and install the mouse event handler function. This is the first function you must call before using any of the mouse functions. This mouse code uses the fastest possible techniques to save and restore mouse backgrounds 
  3196. and to draw the mouse cursor.
  3197. <:s><:#286,9360>
  3198. <:#579,9360><+!>WARNING:<-!> This function uses and updates <+">NonVisual_Offset<-"> to allocate video ram for the saved mouse background.
  3199. <:s><:#286,9360>
  3200. <:s><:#586,9360><+!>LIMITATIONS:<-!> No clipping is supported horizontally for the mouse cursor. No validity checking is performed for 
  3201. <+">NonVisual_Offs<-">
  3202. <:s><:#286,9360>
  3203. <:#2030,9360><+!>**WARNING**<-!>  You must Hide or at least Freeze the mouse cursor while drawing using any of the other XLIB modules since the mouse handler may modify VGA register settings at any time. VGA register settings are not preserved which will result in unpre
  3204. dictable drawing behavior. If you know the drawing will occur away from the mouse cursor set 
  3205. <+">MouseFrozen<-"> to TRUE (1), do your drawing then set it to FALSE (0). Alternatively call 
  3206. <+!><+">x_hide_mouse<-"><-!>,  perform your drawing and then call 
  3207. <+!><+">x_show_mouse<-"><-!>. Another alternative is to disable interrupts while drawing but usually drawing takes up a lot of time and having interrupts disabled for too long is not a good
  3208. <:s><:#286,9360>idea.
  3209. <:s><:#286,9360>
  3210. <:s><:#286,9360>
  3211. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_define_mouse_cursor">x_define_mouse_cursor<-"><-!><:f>
  3212. <:#293,9360><+!>C Prototype:<-!>    void x_define_mouse_cursor( char far *MouseDef, unsigned char MouseColor)
  3213. <:s><:#286,9360>
  3214. <:#293,9360><+">MouseDef<-"> - A far pointer to 14 characters containing a bitmask for all the cursor's rows.
  3215. <:s><:#286,9360>
  3216. <:s><:#293,9360><+">MouseColor<-"> - The color to use when drawing the mouse cursor.
  3217. <:s><:#286,9360>
  3218. <:#572,9360>Define a mouse cursor shape for use in subsequent cursor redraws. XMOUSE has a hardwired mouse cursor size of 8 pixels across by 14 pixels down.
  3219. <:s><:#286,9360>
  3220. <:s><:#293,9360><+!>WARNING<-!>: This function assumes<+#> <+">MouseDef<-#><-"> points to 14 bytes.
  3221. <:s><:#286,9360>
  3222. <:#586,9360><+!>Note: <-!><+#>Bit order is in reverse<-#>. i.e. bit 7 represents pixel 0, bit 0 represents pixel 7 in each byte of 
  3223. <+">MouseDef<-"> .
  3224. <:s><:#286,9360>
  3225. <:s><:p<* >>
  3226. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_show_mouse">x_show_mouse<-"><-!><:f>
  3227. <:s><:#293,9360><+!>C Prototype:<-!>  void x_show_mouse();
  3228. <:s><:#286,9360>
  3229. <:s><:#286,9360>Makes the cursor visible if it was previously hidden.  
  3230. <:s><:#286,9360>
  3231. <:s><:#293,9360><+!>See Also:<-!> <+!><+">x_hide_mouse<-"><-!>.
  3232. <:s><:#286,9360>
  3233. <:s><:#286,9360>
  3234. <:#333,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_hide_mouse">x_hide_mouse<-"> 
  3235. <-!><:f>
  3236. <:s><:#293,9360><+!>C Prototype:<-!>  void x_hide_mouse();
  3237. <:s><:#286,9360>
  3238. <:s><:#286,9360>Makes the cursor hidden if it was previously visible.  
  3239. <:s><:#286,9360>
  3240. <:s><:#293,9360><+!>See Also:<-!> <+!><+">x_show_mouse<-"><-!>.
  3241. <:s><:#286,9360>
  3242. <:s><:#286,9360>
  3243. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_mouse_remove<:X11,-32768;TOC 3 "x_mouse_remove"> 
  3244. <-"><-!><:f>
  3245. <:s><:#293,9360><+!>C Prototype:<-!>  void x_mouse_remove();
  3246. <:s><:#286,9360>
  3247. <:s><:#286,9360>Stop mouse event handling and remove the mouse handler.
  3248. <:s><:#286,9360>
  3249. <:s><:#579,9360><+!>NOTE: <-!>This function <+#>MUST<-#> be called before quitting the program if a mouse handler has been installed
  3250. <:s><:#286,9360>
  3251. <:s><:#286,9360>
  3252. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_position_mouse">x_position_mouse<-"><-!><:f>
  3253. <:#293,9360><+!>C Prototype: <-!> void x_position_mouse( int x, int y);
  3254. <:s><:#286,9360>
  3255. <:s><:#293,9360><+">x, y<-"> - Coordinates to move the mouse cursor to.
  3256. <:s><:#286,9360>
  3257. <:s><:#286,9360>Positions the mouse cursor at the specified location
  3258. <:s><:#286,9360>
  3259. <:s><:#286,9360>
  3260. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_mouse_window">x_mouse_window<-"><-!><:f>
  3261. <:#293,9360><+!>C Prototype<-!>:  void x_mouse_window( int x0, int y0, int x1, int y1);
  3262. <:s><:#286,9360>
  3263. <:s><:#293,9360><+">x0, y0<-"> - Coordinates of the upper left corner of the window.
  3264. <:s><:#286,9360>
  3265. <:s><:#293,9360><+">x1, y1<-"> - Coordinates of the lower right corner of the window.
  3266. <:s><:#286,9360>
  3267. <:s>Defines a mouse window.  The mouse cursor is unable to move from this window.<:p<* >>
  3268. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_update_mouse<:X11,-32768;TOC 3 "x_update_mouse"><-"><-!><:f>
  3269. <:s><:#293,9360><+!>C Prototype:<-!>  void x_update_mouse();
  3270. <:s><:#286,9360>
  3271. <:s><:#286,9360>Forces the mouse position to be updated and cursor to be redrawn.  
  3272. <:s><:#286,9360>
  3273. <:s><:#293,9360><+!>Note:<-!> This function is useful when you have set <+">MouseFrozen<-"> to true.  
  3274. <:s>Allows the cursor position to be updated manually rather than automatically by the installed handler.<:p<* >>
  3275. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XBMTOOLS<:X11,-32768;TOC 1 "MODULE XBMTOOLS"><-!><:f>
  3276. <:s><:#286,9360>
  3277. <:s><:#286,9360>
  3278. <:s><:#286,9360>This module implements a set of functions to convert between planar bitmaps and linear bitmaps.
  3279. <:s><:#286,9360>
  3280. <:s><:#286,9360>
  3281. <:#286,9360><+!>PLANAR BITMAPS<-!>
  3282. <:s><:#286,9360>
  3283. <:s><:#286,9360>Planar bitmaps as used by these functions have the following structure:
  3284. <:s><:#286,9360>    BYTE 0                The bitmap width in bytes (4 pixel groups) range 1..255  
  3285. <:s><:#286,9360>    BYTE 1                      The bitmap height in rows range 1..255  
  3286. <:s><:#286,9360>    BYTE 2..n1                 The plane 0 pixels width*height bytes  
  3287. <:s><:#286,9360>    BYTE n1..n2               The plane 1 pixels width*height bytes  
  3288. <:s><:#286,9360>    BYTE n2..n3               The plane 2 pixels width*height bytes  
  3289. <:s><:#286,9360>    BYTE n3..n4               The plane 3 pixels width*height bytes
  3290. <:s><:#293,9360>as used by <+!><+">x_put_pbm, x_get_pbm, x_put_masked_pbm<-"><-!>.
  3291. <:s><:#286,9360>
  3292. <:s><:#286,9360>
  3293. <:s><:#286,9360><+!>LINEAR BITMAPS<-!>
  3294. <:s><:#286,9360>
  3295. <:s><:#286,9360>Linear bitmaps have the following structure:
  3296. <:s><:#286,9360>    BYTE 0                     The bitmap width in pixels range 1..255  
  3297. <:s><:#286,9360>    BYTE 1                     The bitmap height in rows range 1..255  
  3298. <:s><:#286,9360>    BYTE 2..n                  The width*height bytes of the bitmap
  3299. <:s><:#286,9360>
  3300. <:s><:#286,9360>
  3301. <:#286,9360><+!><:X11,-32768;TOC 2 "SOURCES">SOURCES<-!>
  3302. <:#286,9360>    xbmtools.asm 
  3303. <:#286,9360>    xpbmtools.inc 
  3304. <:s><:#286,9360>    model.inc
  3305. <:s><:#286,9360>
  3306. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  3307. <:#286,9360>    xbmtools.h
  3308. <:s><:#286,9360>
  3309. <:s><:p<* >>
  3310. <:#286,9360><+!>MACROS<:X11,-32768;TOC 2 "MACROS"><-!>
  3311. <:s><:#286,9360>
  3312. <:#286,9360>    BM_WIDTH_ERROR
  3313. <:s><:#286,9360>
  3314. <:#286,9360>    LBMHeight( lbitmap)         - Height of linear bitmap "lbitmap"    
  3315. <:s><:#286,9360>
  3316. <:#286,9360>    LBMWidth( lbitmap )          - Width of linear bitmap  "lbitmap"    
  3317. <:s><:#286,9360>
  3318. <:#286,9360>    PBMHeight( pbitmap )         - Height of planar bitmap "pbitmap"    
  3319. <:s><:#286,9360>
  3320. <:#286,9360>    PBMWidth( pbitmap )          - Width of planar bitmap "pbitmap"
  3321. <:s><:#286,9360>
  3322. <:#286,9360>    LBMPutPix( x, y, lbitmap, color)  - Set the color of pixel (x, y) color in linear bitmap
  3323. <:s><:#286,9360>
  3324. <:#286,9360>    LBMGetPix( x, y, lbitmap )        - Get the color of pixel (x, y) in linear bitmap
  3325. <:s><:p<* >>
  3326. <:#286,9360><+!><:X11,-32768;TOC 2 "EXPORT FUNCTIONS">EXPORT FUNCTIONS<-!>
  3327. <:s><:#286,9360>
  3328. <:s><:#286,9360>
  3329. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_pbm_to_bm">x_pbm_to_bm<-"><-!><:f>
  3330. <:#293,9360><+!>C Prototype:<-!>  extern int x_pbm_to_bm( char far * source_pbm, char far * dest_bm);
  3331. <:s><:#286,9360>
  3332. <:s><:#293,9360><+">source_pbm<-"> - A pointer to the source planar bitmap.
  3333. <:s><:#286,9360>
  3334. <:s><:#293,9360><+">dest_bm<-"> - A pointer to a buffer set up to receive the linear bitmap.
  3335. <:s><:#286,9360>
  3336. <:s><:#293,9360><+!>Returns:<-!> 0 on successful conversion.
  3337. <:s><:#286,9360>
  3338. <:s><:#579,9360>This function converts a bitmap in the planar format to the linear format as used by 
  3339. <+!><+">x_compile_bitmap<-"><-!>.
  3340. <:s><:#286,9360>
  3341. <:s><:#293,9360><+!>WARNING:<-!> The source and destination bitmaps <+#>must<-#> be pre-allocated.
  3342. <:s><:#286,9360>
  3343. <:s><:#579,9360><+!>NOTE:<-!> This function can only convert planar bitmaps that are suitable. If the source planar bitmap's width (per plane) is <;>= 256/4 it cannot be converted. In this situation an error code
  3344. <:s><:#286,9360>BM_WIDTH_ERROR.
  3345. <:s><:#286,9360>
  3346. <:s><:#286,9360>
  3347. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_bm_to_pbm<:X11,-32768;TOC 3 "x_bm_to_pbm"> 
  3348. <-"><-!><:f>
  3349. <:#293,9360><+!>C Prototype<-!>:  extern int x_bm_to_pbm( char far * source_lbm, char far * dest_bm);
  3350. <:s><:#286,9360>
  3351. <:s><:#293,9360><+">source_lbm <-"> -  A pointer to the source linear bitmap.
  3352. <:s><:#286,9360>
  3353. <:s><:#293,9360><+">dest_bm <-">- A pointer to a buffer set up to receive the planar bitmap.
  3354. <:s><:#286,9360>
  3355. <:s><:#293,9360><+!>Returns: <-!>0 on successful conversion.
  3356. <:s><:#286,9360>
  3357. <:#572,9360>This function converts a bitmap in the linear format as used by  x_compile_bitmap to the planar format.
  3358. <:s><:#286,9360>
  3359. <:s><:#293,9360><+!>WARNING:<-!> The source and destination bitmaps <+#>must<-#> be pre - allocated
  3360. <:s><:#286,9360>
  3361. <:s><:#579,9360><+!>NOTE: <-!>This function can only convert linear bitmaps that are suitable. If the source linear bitmap's width is not a multiple of 4 it cannot be converted. In this situation an error code
  3362. <:s>BM_WIDTH_ERROR. <:p<* >>
  3363. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE  XCLIPPBM<:X11,-32768;TOC 1 "MODULE  XCLIPPBM"><-!><:f>
  3364. <:s><:#286,9360>
  3365. <:s><:#286,9360>
  3366. <:#865,9360><+!>Note:<-!> VERY SIMILAR to XPBMCLIP. This module implements blits of clipped planar bitmaps.  Blits are clipped to pixels, both horizontally. This makes the unmasked blit function here slightly slower than the equivalent functions in the XPBMCLIP module.
  3367. <:s><:#286,9360>
  3368. <:s><:#286,9360>
  3369. <:#286,9360><+!><:X11,-32768;TOC 2 "SOURCES">SOURCES<-!>
  3370. <:#286,9360>    xclippbm.asm 
  3371. <:#286,9360>    xclippbm.inc 
  3372. <:s><:#286,9360>    xlib.inc 
  3373. <:s><:#286,9360>    model.inc
  3374. <:s><:#286,9360>
  3375. <:s><:#286,9360>
  3376. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  3377. <:#286,9360>    xclippbm.h
  3378. <:s><:#286,9360>
  3379. <:s><:#286,9360>
  3380. <:#286,9360><+!><:X11,-32768;TOC 2 "EXPORTED VARIABLES">EXPORTED VARIABLES<-!>
  3381. <:s><:#286,9360>
  3382. <:#293,9360>    <+">TopBound<-"> - int  
  3383. <:s><:#286,9360>
  3384. <:#293,9360>    <+">BottomBound<-"> - int  
  3385. <:s><:#286,9360>
  3386. <:#293,9360><+">    LeftBound <-">- int  
  3387. <:s><:#286,9360>
  3388. <+">    RightBound <-">- int<:p<* >>
  3389. <:#286,9360><+!><:X11,-32768;TOC 2 "EXPORTED FUNCTIONS">EXPORTED FUNCTIONS<-!>
  3390. <:s><:#286,9360>
  3391. <:s><:#286,9360>
  3392. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_clip_pbm">x_clip_pbm<-"><-!><:f>
  3393. <:s><:#293,9360><+!>C Prototype:<-!> extern int x_clip_pbm (int X, int Y, int ScreenOffs, char far * Bitmap);
  3394. <:s><:#286,9360>
  3395. <:s><:#293,9360><+">X, Y<-"> - The coordinates to place the bitmap at.
  3396. <:s><:#286,9360>
  3397. <:#293,9360><+">ScreenOffset<-"> - The offset of the page on which to draw the bitmap.
  3398. <:s><:#286,9360>
  3399. <:s><:#293,9360><+">Bitmap<-"> - A far pointer to the planar bitmap.
  3400. <:s><:#286,9360>
  3401. <:s><:#579,9360><+!>Returns: <-!> If the entire bitmap turns out to be outside the bounding box, this function returns  a 1, otherwise it returns a 0
  3402. <:s><:#286,9360>
  3403. <:s><:#286,9360>Copies a planar bitmap from SRAM to VRAM, with clipping.  
  3404. <:s><:#286,9360>
  3405. <:s><:#286,9360>.
  3406. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_clip_masked_pbm<:X11,-32768;TOC 3 "x_clip_masked_pbm"><-"><-!><:f>
  3407. <:s><:#293,9360><+!>C Prototype:<-!> extern int x_clip_masked_pbm (int X, int Y,  int ScreenOffs, char far * Bitmap);
  3408. <:s><:#286,9360>
  3409. <:s><:#293,9360><+">X, Y<-"> - The coordinates to place the bitmap at.
  3410. <:s><:#286,9360>
  3411. <:s><:#293,9360><+">ScreenOffset<-"> - The offset of the page on which to draw the bitmap.
  3412. <:s><:#286,9360>
  3413. <:s><:#293,9360><+">Bitmap<-"> - A far pointer to the planar bitmap.
  3414. <:s><:#286,9360>
  3415. <:s><:#579,9360><+!>Returns:  <-!>If the entire bitmap turns out to be outside the bounding box, this function returns a 1, otherwise it returns a 0
  3416. <:s><:#286,9360>
  3417. <:s>Copies a planar bitmap from SRAM to VRAM, with clipping, 0 bytes in the bitmap are not copied.  
  3418. <:p<* >>
  3419. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE  XCIRCLE<:X11,-32768;TOC 1 "MODULE  XCIRCLE"><-!><:f>
  3420. <:s><:#286,9360>
  3421. <:s><:#286,9360>
  3422. <:#286,9360>Mode X circle functions
  3423. <:s><:#286,9360><+!>
  3424. <:#286,9360><+!><:X11,-32768;TOC 2 "SOURCES">SOURCES<-!>
  3425. <:#286,9360>    xcircle.asm 
  3426. <:#286,9360>    xcircle.inc 
  3427. <:s><:#286,9360>    xlib.inc 
  3428. <:s><:#286,9360>    model.inc
  3429. <:s><:#286,9360>
  3430. <:s><:#286,9360>
  3431. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  3432.     xcircle.h<:p<* >>
  3433. <:#286,9360><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!>
  3434. <:s><:#286,9360>
  3435. <:s><:#286,9360>
  3436. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_circle">x_circle<-"><-!><:f>
  3437. <:s><:#293,9360><+!>C Prototype:<-!> extern void x_circle (WORD Left, WORD Top, WORD Diameter, 
  3438. <:s><:#286,9360>                         WORD Color, WORD ScreenOffs);
  3439. <:s><:#286,9360>
  3440. <:s><:#293,9360><+">Left, Top<-"> - The coordinates of the upper left corner of the circle, in pixels.
  3441. <:s><:#286,9360>
  3442. <:s><:#293,9360><+">Diameter <-">- The diameter of the circle.
  3443. <:s><:#286,9360>
  3444. <:s><:#293,9360><+">Color <-">- The color in which to draw the circle.
  3445. <:s><:#286,9360>
  3446. <:s><:#293,9360><+">ScreenOffs<-"> - The page offset to draw the circle on.
  3447. <:s><:#286,9360>
  3448. <:s><:#286,9360>Draws a circle with the given upper-left-hand corner and diameter,  which are given in pixels.
  3449. <:s><:#286,9360>
  3450. <:s><:#286,9360>
  3451. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_filled_circle">x_filled_circle<-"><-!><:f>
  3452. <:s><:#293,9360><+!>C Prototype: <-!>extern void x_filled_circle (WORD Left, WORD Top, WORD Diameter, 
  3453. <:s><:#286,9360>                          WORD Color, WORD ScreenOffs);
  3454. <:s><:#293,9360><+">
  3455. <:s><:#293,9360><+">Left, Top<-"> - The coordinates of the upper left corner of the circle, in pixels.
  3456. <:s><:#286,9360>
  3457. <:s><:#293,9360><+">Diameter <-">- The diameter of the circle.
  3458. <:s><:#286,9360>
  3459. <:s><:#293,9360><+">Color <-">- The color in which to draw the circle.
  3460. <:s><:#286,9360>
  3461. <:s><:#293,9360><+">ScreenOffs<-"> - The page offset to draw the circle on.
  3462. <:s><:#286,9360>
  3463. <:s><:#286,9360>Draws a filled circle with the given upper-left-hand corner and diameter.
  3464. <:s><:p<* >>
  3465. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XDETECT<:X11,-32768;TOC 1 "MODULE XDETECT"><-!><:f>  
  3466. <:s><:#286,9360>
  3467. <:s><:#286,9360>
  3468. <:s><:#286,9360>This module implements a set of functions to detect the PC's hardware configuration.
  3469. <:s><:#286,9360>
  3470. <:s><:#286,9360>
  3471. <:#286,9360><+!><:X11,-32768;TOC 2 "SOURCES">SOURCES<-!>
  3472. <:#286,9360>    xdetect.asm 
  3473. <:#286,9360>    xdetect.inc 
  3474. <:s><:#286,9360>    model.inc
  3475. <:s><:#286,9360>
  3476. <:s><:#286,9360>
  3477. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  3478. <:#286,9360>    xdetect.h
  3479. <:s><:#286,9360>
  3480. <:s><:#286,9360>
  3481. <:#286,9360><+!><:X11,-32768;TOC 2 "EXPORTED MACROS">EXPORTED MACROS<-!>
  3482. <:s><:#286,9360>    I8086    0    
  3483. <:s><:#286,9360>    I80186  1    
  3484. <:s><:#286,9360>    I80286  2    
  3485. <:s><:#286,9360>    I80386  3
  3486. <:s><:#286,9360>
  3487. <:#286,9360>    NoGraphics 0    
  3488. <:#286,9360>    MDA           1    
  3489. <:#286,9360>    CGA            2    
  3490. <:#286,9360>    EGAMono   3    
  3491. <:#286,9360>    EGAColor    4    
  3492. <:#286,9360>    VGAMono   5    
  3493. <:#286,9360>    VGAColor   6    
  3494. <:#286,9360>    MCGAMono   7    
  3495. <:#286,9360>    MCGAColor    8
  3496. <:s><:#286,9360>
  3497. <:#286,9360>    BUS_MOUSE     1    
  3498. <:#286,9360>    SERIAL_MOUSE  2    
  3499. <:#286,9360>    INPORT_MOUSE  3    
  3500. <:#286,9360>    PS2_MOUSE     4    
  3501. <:#286,9360>    HP_MOUSE      5
  3502. <:s><:#286,9360>
  3503. <:s><:p<* >>
  3504. <:#286,9360><+!><:X11,-32768;TOC 2 "EXPORTED VARIABLES">EXPORTED VARIABLES<-!>
  3505. <:s><:#286,9360>
  3506. <:#293,9360><+">MouseButtonCount<-">  WORD - The number of buttons on the detected mouse  
  3507. <:s><:#286,9360>
  3508. <:#293,9360><+">MouseVersion<-"> WORD - Mouse driver version
  3509. <:s><:#286,9360>                (High byte = Major version, Low byte = minor version)
  3510. <:s><:#286,9360>
  3511. <:#293,9360><+">MouseType<-"> BYTE - The mouse type  
  3512. <:s><:#286,9360>
  3513. <:#293,9360><+">MouseIRQ <-"> BYTE - The IRQ number used by the mouse driver
  3514. <:s><:#286,9360>
  3515. <:s><:p<* >>
  3516. <:#286,9360><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!>
  3517. <:s><:#286,9360>
  3518. <:s><:#286,9360>
  3519. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_graphics_card">x_graphics_card<-"><-!><:f>
  3520. <:s><:#293,9360><+!>C Prototype<-!>: extern int x_graphics_card();
  3521. <:s><:#286,9360>
  3522. <:s><:#293,9360><+!>Returns: <-!>The type of graphics card installed. 
  3523. <:s><:#286,9360>
  3524. <:s><:#286,9360>See the defines for this module.
  3525. <:s><:#286,9360>
  3526. <:s><:#286,9360>
  3527. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_processor">x_processor<-"><-!><:f>
  3528. <:s><:#293,9360><+!>C Prototype:<-!> extern int x_processor();
  3529. <:s><:#286,9360>
  3530. <:s><:#293,9360><+!>Returns:<-!> The type of processor installed. 
  3531. <:s><:#286,9360>
  3532. <:s><:#293,9360><+!>Note: <-!>A 486 registers as a 386. 
  3533. <:s><:#286,9360>
  3534. <:s><:#286,9360>See defines for this module.
  3535. <:s><:#286,9360>
  3536. <:s><:#286,9360>
  3537. <:#326,9360><:f280, Times New Roman,0,0,0><+"><+!><:X11,-32768;TOC 3 "x_coprocessor">x_coprocessor<-"><-!><:f>
  3538. <:s><:#293,9360><+!>C Prototype:<-!> extern int x_coprocessor();
  3539. <:s><:#286,9360>
  3540. <:s><:#293,9360><+!>Returns: <-!>1 of a numeric co-processor is present, 0 if not. 
  3541. <:s><:#286,9360>
  3542. <:#579,9360><+!>Note:<-!> The type is not detected but it's not really necessary as the processor type usually determines the numeric coprocessor type
  3543. <:s><:#286,9360>
  3544. <:s><:#286,9360>
  3545. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_mousedriver">x_mousedriver<-"><-!><:f>
  3546. <:s><:#293,9360><+!>C Prototype:<-!> extern int x_mousedriver();
  3547. <:s><:#286,9360>
  3548. <:s><:#293,9360><+!>Returns:<-!> 1 of a mouse driver is installed, 0 otherwise. 
  3549. <:s><:#286,9360>
  3550. <:s><:#286,9360>If a mouse driver is detected the mouse related variables are set accordingly.
  3551. <:s><:#286,9360>
  3552. <:s><:p<* >>
  3553. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XFILEIO<:X11,-32768;TOC 1 "MODULE XFILEIO"><-!><:f>
  3554. <:s><:#286,9360>
  3555. <:s><:#286,9360>
  3556. <:s><:#286,9360>Handle based file I/O functions.
  3557. <:s><:#286,9360>See any good DOS programming reference for more information on int 21h DOS services.
  3558. <:s><:#286,9360>
  3559. <:s><:#286,9360>
  3560. <:#286,9360><+!><:X11,-32768;TOC 2 "SOURCES">SOURCES<-!>
  3561. <:#286,9360>    xfileio.asm 
  3562. <:#286,9360>    xfileio.inc 
  3563. <:s><:#286,9360>    model.inc
  3564. <:s><:#286,9360>
  3565. <:s><:#286,9360>
  3566. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  3567. <:#286,9360>    xfileio.h
  3568. <:s><:#286,9360>
  3569. <:s><:#286,9360>
  3570. <:#286,9360><+!><:X11,-32768;TOC 2 "EXPORTED MACROS">EXPORTED MACROS<-!>
  3571. <:s><:#286,9360><+!>    File access modes<-!>
  3572. <:#286,9360>        F_RDONLY  - Read only.   
  3573. <:#286,9360>        F_WRONLY  - Write only.     
  3574. <:#286,9360>        F_RDWR - Read and write
  3575. <:s><:#286,9360>
  3576. <:s><:#286,9360><+!>    Seek codes<-!>
  3577. <:#286,9360>        SEEK_START - Bytes from the start of the file.
  3578. <:#286,9360>        SEEK_CURR - Bytes from the current position.
  3579. <:#286,9360>        SEEK_END - Bytes from the end of the file.
  3580. <:s><:#286,9360>
  3581. <:s><:#286,9360><+!>    File error value<-!>
  3582.         FILE_ERR<:p<* >>
  3583. <:#286,9360><+!><:X11,-32768;TOC 2 "EXPORTED FUNCTIONS">EXPORTED FUNCTIONS<-!>
  3584. <:s><:#286,9360>
  3585. <:s><:#286,9360>
  3586. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">f_open<:X11,-32768;TOC 3 "f_open"><-"><-!><:f>
  3587. <:#293,9360><+!>C Prototype: <-!>extern int f_open(char * filename, char access);
  3588. <:s><:#286,9360>
  3589. <:s><:#293,9360><+">filename<-"> - A pointer to a string containing the full path and filename you wish to open.
  3590. <:s><:#286,9360>
  3591. <:s><:#293,9360><+">access<-"> -  A character that defines the access mode.
  3592. <:s><:#286,9360>
  3593. <:s><:#293,9360><+!>Returns:<-!> The file handle on success, FILE_ERR on failure.
  3594. <:s><:#286,9360>
  3595. <:s><:#286,9360>Opens a file according to the access char.
  3596. <:s><:#286,9360>
  3597. <:s><:#286,9360>
  3598. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "f_close">f_close<-"><-!><:f>
  3599. <:#293,9360><+!>C Prototype: <-!> extern int f_close(int handle);
  3600. <:s><:#286,9360>
  3601. <:s><:#293,9360><+">handle<-"> -  The handle of the file you wish to close.
  3602. <:s><:#286,9360>
  3603. <:s><:#293,9360><+!>Returns:<-!> 0 on success, FILE_ERR on failure.
  3604. <:s><:#286,9360>
  3605. <:s><:#286,9360>Closes the file associated with the specified handle.
  3606. <:s><:#286,9360>
  3607. <:s><:#286,9360>
  3608. <:#333,9360><:f280, Times New Roman,0,0,0><+!><+">f_read<:X11,-32768;TOC 3 "f_read"><-"> 
  3609. <-!><:f>
  3610. <:#293,9360><+!>C Prototype: <-!> extern int f_read(int handle,char near * buffer, int count);
  3611. <:s><:#286,9360>
  3612. <:s><:#293,9360><+">handle<-"> - The handle of the file you wish to read from.
  3613. <:s><:#286,9360>
  3614. <:s><:#293,9360><+">buffer<-"> - A near pointer to a buffer to receive the bytes from the file.
  3615. <:s><:#286,9360>
  3616. <:s><:#293,9360><+">count<-"> - The number of bytes to read from the file.
  3617. <:s><:#286,9360>
  3618. <:s><:#293,9360><+!>Returns:<-!> The number of bytes read on success, FILE_ERR on failure
  3619. <:s><:#286,9360>
  3620. <:s><:#286,9360>Reads bytes from the a file into a near buffer
  3621. <:s><:#286,9360>
  3622. <:s><:p<* >>
  3623. <:#333,9360><:f280, Times New Roman,0,0,0><+!><+">f_readfar<:X11,-32768;TOC 3 "f_readfar"><-"> 
  3624. <-!><:f>
  3625. <:#293,9360><+!>C Prototype: <-!> extern int f_readfar(int handle,char far * buffer, int count);
  3626. <:s><:#286,9360>
  3627. <:s><:#293,9360><+">handle<-"> - The handle of the file you wish to read from.
  3628. <:s><:#286,9360>
  3629. <:s><:#293,9360><+">buffer<-"> - A far pointer to a buffer set up to receive the data.
  3630. <:s><:#286,9360>
  3631. <:s><:#293,9360><+">count <-">- The number of bytes to read.
  3632. <:s><:#286,9360>
  3633. <:s><:#293,9360><+!>Returns:<-!> The number of bytes read on success, FILE_ERR on failure
  3634. <:s><:#286,9360>
  3635. <:s><:#286,9360>Reads a block of  bytes a file into a far buffer.
  3636. <:s><:#286,9360>
  3637. <:s><:#286,9360>
  3638. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "f_write">f_write<-"><-!><:f>
  3639. <:#293,9360><+!>C Prototype:<-!> extern int f_write(int handle, char near * buffer, int count);
  3640. <:s><:#286,9360>
  3641. <:s><:#293,9360><+">handle<-"> - The handle of the file you wish to write to.
  3642. <:s><:#286,9360>
  3643. <:s><:#293,9360><+">buffer<-"> - A near pointer to a buffer containing the data to write.
  3644. <:s><:#286,9360>
  3645. <:s><:#293,9360><+">count <-">- The number of bytes to write.
  3646. <:s><:#286,9360>
  3647. <:s><:#293,9360><+!>Returns:<-!> The number of bytes written on success, FILE_ERR on failure
  3648. <:s><:#286,9360>
  3649. <:s><:#286,9360>Writes a block bytes to a file from a near buffer
  3650. <:s><:#286,9360>
  3651. <:s><:#286,9360>
  3652. <:#333,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "f_writefar">f_writefar<-"> 
  3653. <-!><:f>
  3654. <:s><:#293,9360><+!>C Prototype:<-!> extern int f_write(int handle, char far * buffer, int count);
  3655. <:s><:#286,9360>
  3656. <:s><:#293,9360><+">handle<-"> - The handle of the file you wish to write to.
  3657. <:s><:#286,9360>
  3658. <:s><:#293,9360><+">buffer<-"> - A far pointer to a buffer containing the data to write.
  3659. <:s><:#286,9360>
  3660. <:s><:#293,9360><+">count <-">- The number of bytes to write.
  3661. <:s><:#286,9360>
  3662. <:s><:#293,9360><+!>Returns:<-!> The number of bytes written on success, FILE_ERR on failure
  3663. <:s><:#286,9360>
  3664. <:s><:#286,9360>Writes a block of bytes to a file from a far buffer.
  3665. <:s><:#286,9360>
  3666. <:s><:#286,9360>
  3667. <:s><:#286,9360>
  3668. <:s><:#286,9360>
  3669. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">f_seek<:X11,-32768;TOC 3 "f_seek"> 
  3670. <-"><-!><:f>
  3671. <:#293,9360><+!>C Prototype:<-!> extern long int f_seek(int handle, long int position,  char method_code)
  3672. <:s><:#286,9360>
  3673. <:s><:#293,9360><+">handle<-"> - The handle of the file you are working with.
  3674. <:s><:#286,9360>
  3675. <:s><:#293,9360><+">position<-"> - The position to move to.
  3676. <:s><:#286,9360>
  3677. <:s><:#293,9360><+">method_code<-"> - The seek method you wish to use. (See the defines.)
  3678. <:s><:#286,9360>
  3679. <:s><:#293,9360><+!>Returns:<-!> The file pointer position on success, FILE_ERR on failure.
  3680. <:s><:#286,9360>
  3681. <:s><:#286,9360>Moves the file pointer.
  3682. <:s><:#286,9360>
  3683. <:s><:#286,9360>
  3684. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">f_filelength<:X11,-32768;TOC 3 "f_filelength"> 
  3685. <-"><-!><:f>
  3686. <:#293,9360><+!>C Prototype:<-!> extern long int f_filelength(int handle)
  3687. <:s><:#286,9360>
  3688. <:s><:#293,9360><+">handle<-"> - The handle of the file you are working with.
  3689. <:s><:#286,9360>
  3690. <:s><:#293,9360><+!>Returns:<-!> The length of the file on success, FILE_ERR on failure.
  3691. <:s><:#286,9360>
  3692. <:s><:#286,9360>
  3693. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">f_tell<:X11,-32768;TOC 3 "f_tell"><-"><-!><:f>
  3694. <:#293,9360><+!>C Prototype:<-!>  extern long int f_tell(int handle)
  3695. <:s><:#286,9360>
  3696. <:s><:#293,9360><+">handle<-"> - The handle of the file you are working with.
  3697. <:s><:#286,9360>
  3698. <:s><+!>Returns:<-!> The file pointer position on success, FILE_ERR on failure<:p<* >>
  3699. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XRLETOOL<:X11,-32768;TOC 1 "MODULE XRLETOOL"><-!><:f>
  3700. <:s><:#286,9360>
  3701. <:s><:#286,9360>
  3702. <:s><:#286,9360>This module implements a number of functions comprising an RLE encoding decoding system.
  3703. <:s><:#286,9360>
  3704. <:s><:#286,9360>
  3705. <:#286,9360><+!><:X11,-32768;TOC 2 "SOURCES">SOURCES<-!>
  3706. <:#286,9360>    xrletool.asm 
  3707. <:#286,9360>    xrletool.inc 
  3708. <:s><:#286,9360>    model.inc
  3709. <:s><:#286,9360>
  3710. <:s><:#286,9360>
  3711. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  3712. <:#286,9360>    xrletool.h
  3713. <:s><:#286,9360>
  3714. <:s><:p<* >>
  3715. <:#286,9360><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!>
  3716. <:s><:#286,9360>
  3717. <:s><:#286,9360>
  3718. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_buff_RLDecode">x_buff_RLDecode<-"><-!><:f>
  3719. <:#293,9360><+!>C prototype<-!>:  extern unsigned int x_buff_RLDecode(char far * source_buff, char far *dest_buff);
  3720. <:s><:#286,9360> 
  3721. <:s><:#293,9360><+">source_buff<-">   - A far pointer to the buffer to compress   
  3722. <:s><:#286,9360>
  3723. <:#293,9360><+">dest_buff<-">   -  A far pointer to the destination buffer
  3724. <:s><:#286,9360>
  3725. <:s><:#293,9360><+!>Returns:<-!> The size of the resultant uncompressed data.
  3726. <:s><:#286,9360>
  3727. <:s><:#286,9360>Expands an RLE compressed source buffer to a destination buffer. 
  3728. <:s><:#286,9360>
  3729. <:s><:#293,9360><+!>WARNING: <-!>The buffers <+#>must<-#> be pre-allocated.
  3730. <:s><:#286,9360>
  3731. <:s><:#286,9360>
  3732. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_buff_RLEncode">x_buff_RLEncode<-"><-!><:f>
  3733. <:#293,9360><+!>C prototype<-!>:  extern unsigned int x_buff_RLEncode( char far * source_buff,  char far *dest_buff,
  3734. <:s><:#286,9360>                                    unsigned int count);
  3735. <:s><:#286,9360> 
  3736. <:s><:#293,9360><+">source_buff <-">  - A far pointer to the buffer to compress.
  3737. <:s><:#286,9360>
  3738. <:s><:#293,9360><+">dest_buff<-">   - A far pointer to the destination buffer.
  3739. <:s><:#286,9360>
  3740. <:s><:#293,9360><+">count  <-">- The size of the source data in bytes.
  3741. <:s><:#286,9360>
  3742. <:s><:#293,9360><+!>Returns:<-!> The size of the resultant compressed data.
  3743. <:s><:#286,9360>
  3744. <:s><:#286,9360>RLE Compresses a source buffer to a destination buffer. 
  3745. <:s><:#286,9360><+!>
  3746. <:s><:#293,9360><+!>WARNING:<-!> The buffers <+#>must<-#> be pre allocated.
  3747. <:s><:#286,9360>
  3748. <:s><:#286,9360>
  3749. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_buff_RLE_size<:X11,-32768;TOC 3 "x_buff_RLE_size"> 
  3750. <-"><-!><:f>
  3751. <:#293,9360><+!>C prototype:<-!> extern unsigned int x_buff_RLE_size( char far * source_buff,  unsigned int count);
  3752. <:s><:#286,9360>
  3753. <:s><:#293,9360><+">source_buff <-">  - A far pointer to the uncompressed data buffer   
  3754. <:s><:#286,9360>
  3755. <:s><:#293,9360><+">count <-"> - The size of the source data in bytes
  3756. <:s><:#286,9360>
  3757. <:s><:#293,9360><+!>Returns:<-!> The size the input data would compress to.
  3758. <:s><:#286,9360>
  3759. <:s><:#286,9360>
  3760. <:#333,9360><:f280, Times New Roman,0,0,0><+!><+">x_file_RLEncode<:X11,-32768;TOC 3 "x_file_RLEncode"><-"> 
  3761. <-!><:f>
  3762. <:#293,9360><+!>C prototype:<-!>  extern unsigned int x_file_RLEncode( int handle, char far * source_buff,
  3763. <:s><:#286,9360>                            unsigned int count);
  3764. <:s><:#286,9360>
  3765. <:s><:#293,9360><+">source_buff <-">  - A far pointer to the buffer to compress  
  3766. <:s><:#286,9360>
  3767. <:s><:#293,9360><+">handle<-"> - The output file handle.
  3768. <:s><:#286,9360>
  3769. <:s><:#293,9360><+">count<-">  - The size of the source data in bytes
  3770. <:s><:#286,9360>
  3771. <:s><:#293,9360><+!>Returns:<-!>  The size of the resultant compressed data or 0 if it fails.
  3772. <:s><:#286,9360>
  3773. <:s><:#286,9360>RLE Compresses a source buffer to an output file. 
  3774. <:s><:#286,9360>
  3775. <:s><:#286,9360>
  3776. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_file_RLDecode">x_file_RLDecode<-"><-!><:f>
  3777. <:#293,9360><+!>C prototype:<-!>  extern unsigned int x_buff_RLDecode( int handle,  char far * dest_buff);
  3778. <:s><:#293,9360><+">
  3779. <:s><:#293,9360><+">handle<-"> - Input file handle   
  3780. <:s><:#286,9360>
  3781. <:s><:#293,9360><+">dest_buff <-"> - A far pointer to the destination buffer
  3782. <:s><:#286,9360>
  3783. <:s><:#293,9360><+!>Returns: <-!>The size of the resultant uncompressed data.
  3784. <:s><:#286,9360>
  3785. <:s><:#286,9360>Expands an RLE compresses file to a destination RAM buffer.   
  3786. <:s><:p<* >>
  3787. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>MODULE XPOLYGON<:X11,-32768;TOC 1 "MODULE XPOLYGON"><-!><:f>
  3788. <:s><:#286,9360>
  3789. <:s><:#286,9360>
  3790. <:s><:#286,9360>This module implements general filled convex polygon and triangle functions
  3791. <:s><:#286,9360>
  3792. <:#286,9360><+!><:X11,-32768;TOC 2 "SOURCES">SOURCES<-!>
  3793. <:#293,9360><+!>    <-!>xpolygon.asm
  3794. <:#286,9360>    xpolygon.inc
  3795. <:s><:#286,9360><+!>
  3796. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  3797. <:#286,9360>    xpolygon.h
  3798. <:s><:#286,9360>
  3799. <:s><:#286,9360>
  3800. <:#286,9360><+!><:X11,-32768;TOC 2 "TYPE DEFS">TYPE DEFS<-!>
  3801. <:#286,9360>    typedef struct {    int X;    int Y;  } far VERTEX;
  3802. <:s><:#286,9360>
  3803. <:s><:p<* >>
  3804. <:#286,9360><+!><:X11,-32768;TOC 2 "EXPORTED FUNCTIONS">EXPORTED FUNCTIONS<-!>
  3805. <:s><:#286,9360>
  3806. <:s><:#286,9360>
  3807. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_triangle<:X11,-32768;TOC 3 "x_triangle"><-"><-!><:f>
  3808. <:#293,9360><+!>C Prototype:<-!>  void x_triangle( int x0, int y0, int x1, int y1, int x2, int y2, WORD color, 
  3809. <:s><:#286,9360>                WORD PageBase);
  3810. <:s><:#286,9360>
  3811. <:s><:#293,9360><+">x0, y0<-"> -  The coordinates of point one of the triangle.
  3812. <:s><:#286,9360>
  3813. <:s><:#293,9360><+">x1, y1<-"> - The coordinates of point two of the triangle.
  3814. <:s><:#286,9360>
  3815. <:s><:#286,9360>x2, y2  - The coordinates of the third (and final) point of the triangle.
  3816. <:s><:#286,9360>
  3817. <:s><:#293,9360><+">color<-"> - The color in which to draw the triangle in.
  3818. <:s><:#286,9360>
  3819. <:s><:#293,9360><+">PageBase<-"> - The page offset on which to draw the triangle.
  3820. <:s><:#286,9360>
  3821. <:#579,9360>This function draws a filled triangle which is clipped to the current clipping window defined by 
  3822. <+">TopClip, BottomClip, LeftClip, RightClip<-">.  
  3823. <:s><:#286,9360>
  3824. <:s><:#579,9360><+!>Remember: <-!><+#>The X clipping variable are in BYTES not PIXELS<-#> so you  can only clip to 4 pixel byte boundaries.
  3825. <:s><:#286,9360>
  3826. <:s><:p<* >>
  3827. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_polygon">x_polygon<-"><-!><:f>
  3828. <:#293,9360><+!>C Prototype:<-!>  void x_polygon( VERTEX *vertices, int  num_vertices, WORD color,
  3829. <:s><:#286,9360>                WORD PageBase);
  3830. <:s><:#293,9360><+">
  3831. <:#293,9360><+">vertices<-"> - A pointer to your vertex structure.
  3832. <:s><:#286,9360>
  3833. <:s><:#293,9360><+">num_vertices<-"> - The number of vertices to plot.
  3834. <:s><:#286,9360>
  3835. <:s><:#293,9360><+">color<-"> - The color in which to draw the polygon.
  3836. <:s><:#286,9360>
  3837. <:s><:#293,9360><+">PageBase<-"> - The page offset on which to draw the polygon.
  3838. <:s><:#286,9360>
  3839. <:s><:#572,9360>This function is similar to the triangle function but draws convex polygons. The vertices are supplied in the form of a FAR  pointer.
  3840. <:s><:#286,9360>
  3841. <:s><:#579,9360><+!>NOTE:<-!> A convex polygon is one such that if you draw a line from any two vertices, every point on that line will be within the  polygon.
  3842. <:s><:#286,9360>
  3843. <+@>This function works by splitting up a polygon into its component triangles and calling the triangle routine above to draw each one. Performance is respectable but a custom polygon routine might be faster.<:p<* >><:f280,2Times New Roman,0,0,0><+!>MODULE XBEZ
  3844. <-!><:f><+!><:f280,2Times New Roman,0,0,0>IER<-!><:f><:X11,-32768;TOC 1 "MODULE XBEZIER">
  3845. <+@><:s><:#286,9360>
  3846. <+@><:#286,9360>Bezier curve plotting function. See "What is a Bezier curve?" for more details.
  3847. <+@><:s><:#286,9360>
  3848. <+@><:s><:#286,9360>
  3849. <+@><:#286,9360><+!><:X11,-32768;TOC 2 "SOURCES">SOURCES<-!>
  3850. <:#286,9360>    xbezier.asm
  3851. <:s><:#286,9360>    xlib.inc
  3852. <:s><:#286,9360>
  3853. <:s><:#286,9360><+!>
  3854. <:#286,9360><+!>C HEADER FILE<:X11,-32768;TOC 2 "C HEADER FILE"><-!>
  3855. <+!>    <-!>xbezier.h<:p<* >>
  3856. <:#286,9360><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!>
  3857. <:s><:#286,9360><+!>
  3858. <:s><:#286,9360><+!>
  3859. <:#326,9360><+!><:f280, Times New Roman,0,0,0><+">x_bezier<:X11,-32768;TOC 3 "x_bezier"><-">
  3860. <:#293,9360><+!>C Prototype:<-!> void x_bezier( int e1x, int e1y, int c1x, int c1y, int c2x, int c2y,
  3861. <:#286,9360>                int e2x, int e2y, int levels, char color, WORD PageBase);
  3862. <:s><:#286,9360>
  3863. <:s><:#293,9360><+">e1x, e1y, e2x, e2y<-"> - The coordinates of the two endpoints.
  3864. <:s><:#286,9360>
  3865. <:s><:#293,9360><+">c1x, c1y, c2x, c2y<-"> - The coordinates of the two control points.
  3866. <:s><:#286,9360>
  3867. <:s><:#293,9360><+">levels<-"> - 
  3868. <:s><:#286,9360>
  3869. <:s><:#293,9360><+">color<-"> - The color to draw with.
  3870. <:s><:#286,9360>
  3871. <:s><:#293,9360><+">PageBase<-"> - The page offset on which to draw.
  3872. <:s><:#286,9360>
  3873. <:s><:#286,9360>Plots a Bezier curve on the screen.
  3874. <:s><:#286,9360>
  3875. <:s><:#293,9360><+!>See also: <-!>"What is a Bezier curve?"
  3876. <:s><:#286,9360>
  3877. <:s><:#286,9360>
  3878. <:s><:#286,9360><+!>
  3879. <:s><:#286,9360><+!>
  3880. <+B><:p<* >><:f280, Times New Roman,0,0,0><+!>MODULE XFILL<:X11,-32768;TOC 1 "MODULE XFILL">
  3881. <+@><:s><:#333,9360><+!><:f280, Times New Roman,0,0,0>
  3882. <:s><:#286,9360>This module implements a couple of general purpose flood fill functions.
  3883. <:s><:#286,9360>
  3884. <:s><:#286,9360><+!>
  3885. <:#286,9360><+!><:X11,-32768;TOC 2 "SOURCES">SOURCES
  3886. <:#286,9360>    xfill.asm
  3887. <:s><:#286,9360>    xlib.inc
  3888. <:s><:#286,9360>
  3889. <:#286,9360><+!>C HEADER FILE<:X11,-32768;TOC 2 "C HEADER FILE">
  3890.     xfill.h<:p<* >>
  3891. <:#286,9360><-!><+!><:X11,-32768;TOC 2 "EXPORTED FUNCTIONS">EXPORTED FUNCTIONS
  3892. <:s><:#286,9360><+!>
  3893. <:s><:#286,9360><+!>
  3894. <:#326,9360><:f280, Times New Roman,0,0,0><+"><+!>x_flood_fill<-!><-"><:X11,-32768;TOC 3 "x_flood_fill">
  3895. <:#293,9360><+!>C Prototype: <-!>int x_flood_fill( int x, int y, WORD offs, int boundary, int color);
  3896. <:s><:#286,9360>
  3897. <:s><:#293,9360><+">x, y <-">- The starting coordinates.
  3898. <:s><:#286,9360>
  3899. <:s><:#293,9360><+">offs<-"> - The page offset to draw on.
  3900. <:s><:#286,9360>
  3901. <:#293,9360><+">boundary -  Boundary<-"><+"> color.
  3902. <:s><:#286,9360>
  3903. <:s><:#293,9360><+">color<-"> - The color to use for the fill.
  3904. <:s><:#286,9360>
  3905. <:s><:#293,9360><+!>Returns:<-!> The number of pixels that were filled.
  3906. <:s><:#286,9360>
  3907. <:#1151,9360>This function performs the familiar flood filling used by many paint programs and, of course, the Borland BGI's flood fill function.  The pixel at 
  3908. <+">x, y<-"><+"> <-"> and all adjacent pixels of the same color are filled with the new color.  Filling stops when there are no more adjacent pixels of the original pixels color.
  3909. <:s><:#286,9360>
  3910. <:s><:#286,9360>
  3911. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_boundry_fill">x_boundry_fill<-"><-!>
  3912. <:#293,9360><+!>C Prototype: <-!>int x_boundry_fill( int x, int y, WORD offs, int boundary, int color);
  3913. <:s><:#286,9360>
  3914. <:s><:#293,9360><+">x, y <-">- The starting coordinates.
  3915. <:s><:#286,9360>
  3916. <:s><:#293,9360><+">offs<-"> - The page offset to draw on.
  3917. <:s><:#286,9360>
  3918. <:#293,9360><+">boundary -  Boundary color.
  3919. <:s><:#286,9360>
  3920. <:s><:#293,9360><+">color<-"> - The color to use for the fill.
  3921. <:s><:#286,9360>
  3922. <:s><:#293,9360><+!>Returns:<-!> The number of pixels that were filled.
  3923. <:s><:#286,9360>
  3924. <:#872,9360>This function performs a variant of the flood fill described above. The pixel at 
  3925. <+">x, y<-"><+"> <-"> and all adjacent pixels of the same color are filled with the new color.  Filling stops when the area being filled is fully enclosed by pixels of the color 
  3926. <+">boundary.
  3927. <:s><:#326,9360><+!><+"><:f280, Times New Roman,0,0,0>
  3928. <+B><:p<* >><:f280, Times New Roman,0,0,0><+!>MODULE XVSYNC<:X11,-32768;TOC 1 "MODULE XVSYNC"><-!><:f>
  3929. <+@><:s><:#286,9360>
  3930. <:#286,9360>Inspired by REND386 v3.01 by Dave Stamps and Bernie Roehl
  3931. <:s><:#286,9360>
  3932. <:#1430,9360>This module uses timer 0 to simulate a vertical retrace interrupt.  It's designed to significantly reduce the idle waiting time in XLIB.  Why simulate the VRT interrupt?  Simply because a true VRT interrupt is not implemented on many VGA cards.  Using a VRT
  3933.  interrupt as opposed to polling, can result in huge performance improvements for your code and help make animation much smoother than it would be using polling.
  3934. <:s><:#286,9360>
  3935. <:#1158,9360>Normally XLIB waits for vsync when <+!><+">x_page_flip, x_set_start_address<-!><-"> or 
  3936. <+!><+">x_put_pal_???<-!><-"> is called. the waiting period could be better utilized to do housekeeping calculations or whatever.  The 
  3937. <+!><+">x_put_pal_???<-!><-"> functions also don't work very smoothly in conjunction with other functions that wait for the vertical retrace since each function introduces its own VRT delay.
  3938. <:s><:#286,9360>
  3939. <:#572,9360>When using the vsync handler, the VRT delay is reduced to the absolute minimum which can result in a huge performance boost for your programs.
  3940. <:s><:#286,9360>
  3941. <:s><:#572,9360>When using double buffering, you may still have to wait before drawing, but you could do as much other work as possible, like this:
  3942. <:s><:#286,9360>
  3943. <:s><:#280,9360>    <:f240,2MS Serif,0,0,0>x_page_flip(...);
  3944. <:s><:#280,9360><:f240,2MS Serif,0,0,0>    <:f><:f240,2MS Serif,0,0,0>/* animate the palette */
  3945. <:s><:#280,9360><:f240,2MS Serif,0,0,0>    /* <:f><:f240,2MS Serif,0,0,0>do some collision detection and 3D calculations */
  3946. <:s><:#280,9360><:f240,2MS Serif,0,0,0>    /* read the joystick */
  3947. <:#280,9360><:f240,2MS Serif,0,0,0>    <:f><:f240,2MS Serif,0,0,0>x_wait_start_address();   /* Not needed with triple buffering. *<:f><:f240,2MS Serif,0,0,0>/
  3948. <:s><:#280,9360><:f240,2MS Serif,0,0,0>    /* draw the next frame. */
  3949. <:s><:#286,9360>
  3950. <:s><:#286,9360>
  3951. <:#286,9360><+!><:X11,-32768;TOC 2 "SOURCES">SOURCES<-!>
  3952. <:#286,9360>    xvsync.asm
  3953. <:s><:#286,9360>    xmain.asm
  3954. <:#286,9360>    xvsync.inc
  3955. <:s><:#286,9360>    xmain.inc
  3956. <:s><:#286,9360>
  3957. <:s><:#286,9360><+!>
  3958. <:#286,9360><+!><:X11,-32768;TOC 2 "C HEADER FILE">C HEADER FILE<-!>
  3959. <:#293,9360><+!>    <-!>xvsync.h
  3960. <:s><:p<* >>
  3961. <:#286,9360><+!><:X11,-32768;TOC 2 "EXPORTED VARIABLES">EXPORTED VARIABLES<-!>
  3962. <:s><:#286,9360><+!>
  3963. <:#293,9360><+">VsyncPeriod<-"> WORD - Time in 1.193 between two vsyncs.
  3964. <:s><:#286,9360>
  3965. <:#293,9360><+">TicksPerSecond<-"> WORD - Number of vsyncs per second.
  3966. <:s><:#286,9360>
  3967. <:#293,9360><+">VsyncTimerInt<-">   long  - Number of vsyncs since <+!><+">x_install_vsync_handler<-!><-"> was called. Nice for<-">
  3968. <:s>                game timing.<:p<* >>
  3969. <:#286,9360><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS"><-!>
  3970. <:s><:#286,9360><+!>
  3971. <:s><:#286,9360><+!>
  3972. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_install_vsync_handler<:X11,-32768;TOC 3 "x_install_vsync_handler"><-"><-!>
  3973. <:#293,9360><+!>C Prototype:<-!> void x_install_vsync_handler( int VRTsToSkip);
  3974. <:s><:#286,9360>
  3975. <:#293,9360><+">VRTsToSkip<-"> - Defines the delay in VRT's between consecutive physical start address changes,
  3976. <:s><:#286,9360>        thus allowing you to limit the maximum frame rate for page flips in animation
  3977. <+A><:s><:#293,9360>        systems. The frame rate is calculated as Vertical Refresh Rate / 
  3978. <+">VRTsToSkip.<-">
  3979. <:#293,9360><+">        <-">Thus in the 320x240 mode which refreshes at 60Hz a <+">VRTsToSkip<-"> value of 
  3980. <:#286,9360>        3 will result in a maximum page flipping rate of 20Hz (Frames per second).
  3981. <:s><:#286,9360>
  3982. <:s><:#286,9360>This function installs the vsync handler using timer 0.  It's called about 100 microseconds before
  3983. <:s><:#286,9360>every vertical retrace.
  3984. <:s><:#286,9360>
  3985. <:s><:#293,9360><+!>WARNING<-!><+!>:<-!> Be sure to remove it before exiting your program.
  3986. <:s><:#286,9360>        When used with a debugger, the system clock may speed up.
  3987. <:s><:#286,9360>
  3988. <:s><:#286,9360>
  3989. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+">x_remove_vsync_handler<:X11,-32768;TOC 3 "x_remove_vsync_handler"><-"><-!>
  3990. <:s><:#293,9360><+!>C Prototype: <-!>void x_remove_vsync_handler( void );
  3991. <:s><:#286,9360>
  3992. <:s><:#286,9360>This function removes the vsync handler.
  3993. <:s><:#286,9360>
  3994. <:s><:#286,9360>You <+#>must<-#> call this function before exiting your program, or your system will crash!
  3995. <:s><:#286,9360>
  3996. <:s><:#286,9360>
  3997. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><:X11,-32768;TOC 3 "x_set_user_vsync_handler">x_set_user_vsync_handler<-"><-!>
  3998. <:s><:#293,9360><-"><+!>C Prototype: <-!>void x_set_user_vsync_handler( void far (*f)() );
  3999. <:s><:#286,9360>
  4000. <:s><:#293,9360><+">f<-"> - A far pointer to a user function to be called once each vertical retrace.
  4001. <:s><:#286,9360>
  4002. <:#572,9360>This function installs a user routine to be called once each vertical retrace.  The user handler has its own stack of 256 bytes, so be careful with the stack checking option in BC.
  4003. <:s><:#286,9360>
  4004. <:s><:#293,9360><+!>WARNING:<-!> This installs an interrupt driven handler, beware of the following:
  4005. @Bullet 1@<:s><:#286,9360>Only 8086 registers are preserved.  If you're using 386 code, save all the 386 registers.
  4006. @Bullet 1@<:s><:#286,9360>Don't do any drawing.
  4007. @Bullet 1@<:s><:#286,9360>Don't call any DOS functions.
  4008. <:s><:#286,9360>
  4009. <:s>You CAN update global variables if you're careful.  And it's nice for palette animation.  You can even do fades while loading from disk. You should usee this instead of installing your own int 08h routine and chaining to the original.<:p<* >>
  4010. <:#326,9360><:f280, Times New Roman,0,0,0><+!><+"><-#>x_wait_start_addr<:X11,-32768;TOC 3 "x_wait_start_addr"><-"><-!>
  4011. <:s><:#293,9360><+!>C Prototype: <-!>void x_wait_start_addr( void );
  4012. <:s><:#286,9360>
  4013. <:s><:#579,9360>You must call this function before drawing after a call to <+!><+">x_set_start_addr<-!><-"> or 
  4014. <+!><+">x_page_flip<-!><-"> when you are using the vsync handler and not using triple buffering.<-"><-">
  4015. <:s><:#286,9360>
  4016. <:s><:#286,9360>            
  4017. <:s><:#286,9360>
  4018. <:s><:#286,9360><+!>
  4019. <:s><:#286,9360>
  4020. <:s><:#286,9360>
  4021. <:s><:#286,9360>
  4022. <+B><:f240,2MS Serif,0,0,0>    <:f><-"><-"><-"><:p<* >><:f280, Times New Roman,0,0,0><+!>MODULE XCBITM32<:X11,-32768;TOC 1 "MODULE XCBITM32">
  4023. <+@><:s><:#333,9360><+!><:f280, Times New Roman,0,0,0>
  4024. <:#579,9360>This module implements 32 bit compiling of linear bitmaps.  There are no functions for plotting the compiled bitmaps in this module, use 
  4025. <+!><+">x_put_cbitmap<-!><-"> for that.
  4026. <:s><:#286,9360>
  4027. <:s><:#286,9360>
  4028. <:#286,9360><+!>SOURCES<:X11,-32768;TOC 2 "SOURCES">    
  4029. <:#293,9360><+!>    <-!>xcbitm32.c
  4030. <:s><:#286,9360>
  4031. <:s><:#286,9360>
  4032. <:#286,9360><+!>C HEADER FILE<:X11,-32768;TOC 2 "C HEADER FILE">
  4033. <:#293,9360><+!>    <-!><-">xcbitm32.h
  4034. <:s><:p<* >>
  4035. <:#286,9360><+!>EXPORTED FUNCTIONS<:X11,-32768;TOC 2 "EXPORTED FUNCTIONS">
  4036. <:s><:#286,9360><+!>
  4037. <:s><:#286,9360><+!>
  4038. <:#326,9360><+!><+"><:f280, Times New Roman,0,0,0>x_compile_bitmap_32<:X11,-32768;TOC 3 "x_compile_bitmap_32"><-"><-!><:f>
  4039. <:s><:#293,9360><+!>C Prototype: <-!> x_compile_bitmap_32( WORD lsw, char far *bitmap, char far *output );
  4040. <:s><:#286,9360>
  4041. <:s><:#293,9360><+">lsw<-"> - The logical screen width in bytes.
  4042. <:s><:#286,9360>
  4043. <:s><:#293,9360><+">bitmap<-"> - A pointer to the source linear bitmap.
  4044. <:s><:#286,9360>
  4045. <:s><:#293,9360><+">output<-"> - A far pointer to a buffer set up to receive the compiled bitmap.
  4046. <:s><:#286,9360>
  4047. <:s><:#293,9360><+!>Returns: <-!>The size of the compiled bitmap in bytes.
  4048. <:s><:#286,9360>
  4049. <:s><:#572,9360>Compiles a linear bitmap to generate 386+ machine code to plot it at any required screen coordinates FAST!
  4050. <:s><:#286,9360>
  4051. <:s><:#286,9360>
  4052. <:#326,9360><+!><+"><:f280, Times New Roman,0,0,0>x_sizeof_cbitmap_32<:X11,-32768;TOC 3 "x_sizeof_cpbm">
  4053. <:#293,9360><:f><-"><+!>C Prototype: <-!> int x_sizeof_cbitmap32( WORD lsw, char far *bitmap );
  4054. <:s><:#286,9360>
  4055. <:s><:#293,9360><+">lsw<-"> - The logical screen width in bytes.
  4056. <:s><:#286,9360>
  4057. <:s><:#293,9360><+">bitmap<-"> - A far pointer to the source linear bitmap.
  4058. <:s><:#286,9360>
  4059. <:s><:#293,9360><+!>Returns: <-!> The space in bytes required to hold the compiled bitmap.
  4060. <+B><:s><:p<* >>
  4061. <+B><:#333,9360><:f280,2Times New Roman,0,0,0><+!>REFERENCE SECTION<:X11,-32768;TOC 1 "REFERENCE SECTION"><-!><:f>
  4062. <:s><:#286,9360>
  4063. <:s><:#286,9360>
  4064. <:#286,9360><+!><:X11,-32768;TOC 2 "REFERENCES">REFERENCES<-!>
  4065. <:s><:#286,9360>In my opinion <+#>Doctor Dobbs Journal<-#> is the best reference text for VGA Mode X graphics:
  4066. <:#286,9360>    Issue 178 Jul. 1991 : First reference to Mode X Article Abstract   : VGA's undocumented
  4067. <:s><:#286,9360>                      Mode X supports page flipping,  makes off screen memory available,
  4068. <:s><:#286,9360>                    has square pixels,  and increases performance by as much as 4 times.
  4069. <:s><:#286,9360>
  4070. <:#286,9360>    Issue 179 Aug. 1991 : Continuation Article Abstract. Michael discusses latches and
  4071. <:#286,9360>                VGA's  undocumented Mode X.
  4072. <:s><:#286,9360>
  4073. <:#286,9360>    Issue 181 Sept. 1991 : Continuation Article Abstract. Michael puts the moves on
  4074. <:#286,9360>                animation using VGA's 256 colors.
  4075. <:s><:#286,9360>
  4076. <:#286,9360>    Issue 184 Oct. 1991 : First of a continuing series covering 3-D animation  using VGA's
  4077. <:s><:#286,9360>                Mode X. This series is still ongoing          
  4078. <:s><:#286,9360>
  4079. <:s><:#286,9360>    (October 1992) Article Abstract. Michael moves into 3-D animation, starting with basic
  4080. <:s><:#286,9360>            polygon fills and page flips.
  4081. <:s><:#286,9360>
  4082. <:s><:#286,9360>
  4083. <:#286,9360><+!><:X11,-32768;TOC 2 "WHAT IS MODE X ?">WHAT IS MODE X ?<-!>
  4084. <:#2002,9360>Mode X is a derivative of the VGA's standard mode 13h (320x200 256 color). It is a (family) of undocumented video modes that are created by tweaking the VGA's registers. The beauty of mode X is that it offers several benefits to the programmer: - Multiple g
  4085. raphic pages where mode 13h doesn't allowing for page flipping  (also known as double buffering) and storage of images and data in offscreen video memory - A planar video ram organization which although more difficult to program, allows the VGA's plane-orie
  4086. nted hardware to be used to process pixels in parallel, improving performance by up to 4 times over mode 13h
  4087. <:s><:#286,9360>
  4088. <:s><:#286,9360>
  4089. <:#286,9360><+!><:X11,-32768;TOC 2 "WHAT IS A SPLIT SCREEN ?">WHAT IS A SPLIT SCREEN ?<-!>
  4090. <:#858,9360>A split screen is a hardware feature offered by the EGA and VGA video cards. A split screen is a mode of graphics operation in which the hardware splits the visual graphics screen horizontally and treats both halves as individual screens each starting at di
  4091. fferent locations in video RAM.
  4092. <:s><:#572,9360>The bottom half (which is usually referred to as the split screen) always starts at address A000:0000 but the top half's starting address is user definable.
  4093. <:s>The most common application of split screens in games is the status display in scrolling games. Split screens make this sort of game simpler to program because when the top half window is scrolled the programmer does not have to worry about redrawing the bo
  4094. ttom half.<:p<* >>
  4095. <:#286,9360><+!><:X11,-32768;TOC 2 "WHAT IS RLE?">WHAT IS RLE?<-!>
  4096. <:#1430,9360>RLE stands for RUN LENGTH ENCODING. It is a quick simple data compression scheme which is commonly used for image data compression or compression of any data. Although not the most efficient system, it is fast, which is why it is used in image storage syste
  4097. ms like PCX. This implementation is more efficient than the one used in PCX files because it uses 1 bit to identify a Run Length byte as opposed to two in PCX files, but more on this later.
  4098. <:s><:#286,9360>
  4099. <:s><:#572,9360>This set of functions can be used to implement your own compressed image file format or for example compress game maps for various levels etc. The uses are limited by your imagination.
  4100. <:s><:#286,9360>I opted for trading off PCX RLE compatibility for the improved compression efficiency.
  4101. <:s><:#286,9360>
  4102. <:s><:#286,9360>Here is how the data is un-compressed to give an idea of its structure.
  4103. <:s><:#286,9360>    STEP 1 read a byte from the RLE compressed source buffer.
  4104. <:s><:#286,9360>
  4105. <:s><:#286,9360>    STEP 2 If has its high bit is set then the lower 7 bits represent the number of times the next
  4106. <:s><:#286,9360>                   byte is to be repeated in the destination buffer. If the count (lower 7 bits) is zero
  4107. <:#286,9360>        then we have finished decoding goto STEP 5 else goto STEP 4
  4108. <:s><:#286,9360>
  4109. <:s><:#286,9360>    STEP 3 Read a data from the source buffer and copy it directly to the destination buffer.
  4110. <:s><:#286,9360>        goto STEP 1
  4111. <:s><:#286,9360>
  4112. <:s><:#286,9360>    STEP 4 Read a data byte from the source buffer and copy it to the destination buffer the
  4113. <:s><:#286,9360>        number of times specified by step 2. goto STEP 1
  4114. <:s><:#286,9360>
  4115. <:s><:#286,9360>    STEP 5 Stop, decoding done.
  4116. <:s><:#286,9360>
  4117. <:#286,9360>If the byte does not have the high bit set then the byte itself is transferred to the destination buffer.
  4118. <:#572,9360>Data bytes that have the high bit already set and are unique in the input stream are represented as a Run Length of 1 (i.e. 81 which includes high bit) followed by the data byte.
  4119. <:s><:#286,9360>
  4120. <:#1144,9360>If your original uncompressed data contains few consecutive bytes and most have high bit set (i.e. have values <;> 127) then your so called compressed data would require up to 2x the space of the uncompressed data, so be aware that the compression ratio is 
  4121. extremely variable depending on the type of data being compressed.
  4122. <:s><:#286,9360>
  4123. <:s><:#858,9360>Apologies for this poor attempt at a description, but you can look up RLE in any good text. Alternatively, any text that describes the PCX file structure in any depth should have a section on RLE compression.
  4124. <:s><:#286,9360>
  4125. <:s><:#286,9360>
  4126. <:s><:p<* >>
  4127. <:#286,9360><+!>WHAT IS DOUBLE BUFFERING ?<:X11,-32768;TOC 2 "WHAT IS DOUBLE BUFFERING ?"><-!>
  4128. <:s><:#1430,9360>Double buffering (also known as page flipping) is the technique most often used to do animation. it requires hardware that is capable of displaying multiple graphics pages (or at least 2). Animation is achieved by drawing an image in the non visible screen 
  4129. and then displaying the non visible screen. Once the page has been flipped the process starts again. The next frame of the animation is drawn on the non visible screen, the page is flipped again etc.
  4130. <:s><:#286,9360>
  4131. <:s><:#286,9360>
  4132. <:#286,9360><+!>WHAT IS TRIPLE BUFFERING?<-!><:X11,-32768;TOC 2 "WHAT IS TRIPLE BUFFERING?">
  4133. <:s><:#286,9360>
  4134. <:s><:#286,9360>
  4135. <:s><:#286,9360>
  4136. <:#286,9360><+!>WHAT IS A BEZIER CURVE?<:X11,-32768;TOC 2 "WHAT IS A BEZIER CURVE?"><-!>
  4137. <:#1144,9360>The Bezier curve was developedd by the French mathematician Pierre Bezier for the design of automobiles.  This curve is defined by four points: two end points and two control points.  The curve begins at one end point, ends at the other end point, and uses 
  4138. the two control points to determine the curvature of the line.
  4139. <:s><:#286,9360>
  4140. <:s><:#286,9360><+!>
  4141. <:s><:#286,9360>
  4142. <:s><:#286,9360>
  4143. <+@><:s><+!><:p<* >>
  4144. <+B><:#286,9360><+!>The Care and Feeding of Compiled Masked Blits<:X11,-32768;TOC 2 "The Care and Feeding of Compiled Masked Blits"><-!>
  4145. <+B><:s><:#286,9360>by Matthew MacKenzie
  4146. <:s><:#286,9360>
  4147. <:s><:#286,9360>The XCBITMAP module is small, containing only three procedures:  
  4148. <:s><:#293,9360>    <+!><+">x_compile_bitmap<-"><-!> - Compiles your bitmap into native code which writes to the VGA
  4149. <:s><:#286,9360>                screen     in an X mode.  
  4150. <:s><:#286,9360>
  4151. <:s><:#293,9360>    <+!><+">x_put_cbitmap<-"><-!> - Converts X and Y coordinates into a location on the screen, sets up the
  4152. <:s><:#286,9360>                necessary VGA registers, and executes the compiled bitmap as a
  4153. <:s><:#286,9360>                subroutine.
  4154. <:s><:#286,9360>
  4155. <:s><:#293,9360>    <+!><+">x_sizeof_cbitmap<-"><-!> - Takes a planar bitmap and returns an integer equal to the size of the
  4156. <:s><:#286,9360>                compiled bitmap which the planar bitmap would produce. It is
  4157. <:s><:#293,9360>                essentially a lobotomized version of <+!><+">x_compile_bitmap<-"><-!>, with all
  4158. <:s><:#286,9360>                the code generation replaced with a size counter.
  4159. <:s><:#286,9360>
  4160. <:#2009,9360><+!><+">x_compile_bitmap<-"><-!> scans through a source bitmap and generates 8086 instructions to plot every non-zero pixel. It is designed to be used before the action begins rather than on-the-fly.  The compiled bitmap contains no branches, and no referen
  4161. ce to the zero (transparent) pixels. Where two pixels are exactly four columns apart they are plotted with a single 16-bit store, and the VGA MAP_MASK register will be set at most four times. As a result your bitmap may run several times faster than a tradi
  4162. tional memory-to-VGA masked blit routine. There is no way to perform clipping on these bitmaps, or to plot a pixel of color zero.
  4163. <:s><:#286,9360>
  4164. <:#1151,9360><+!><+">x_compile_bitmap<-"><-!> works with bitmaps in the standard Xlib planar bitmap format. On a time scale of 60 frames per second, it is actually relatively slow. Since a compiled bitmap is relocatable you may just want to have it saved to disk, and no
  4165. t include the source bitmap in your program at all.    
  4166. <:s><:#286,9360>
  4167. <:s><:#286,9360>The source bitmap format is an array of bytes, a little like this:
  4168. <:s><:#286,9360>char eye<[>] ={4, 7,  /* four byte columns across, seven rows tall */
  4169. <:s><:#286,9360>    0, 0, 0, 0, 9, 1, 1, 1, 9, 0, 0, 0, 0, 0, 0, 0,
  4170. <:s><:#286,9360>       0, 0, 9, 9, 1, 1, 1, 4, 4, 9, 9, 0, 0, 0, 0, 0,
  4171. <:s><:#286,9360>       0, 9, 9, 1, 2, 0, 0, 4, 4, 1, 9, 9, 0, 0, 0, 0,
  4172. <:s><:#286,9360>       9, 9, 9, 1, 0, 0, 0, 0, 1, 1, 9, 9, 9, 0, 0, 0,
  4173. <:s><:#286,9360>       0, 9, 9, 1, 2, 0, 0, 2, 1, 1, 9, 9, 0, 0, 0, 0,
  4174. <:s><:#286,9360>       0, 0, 9, 9, 1, 1, 1, 1, 1, 9, 9, 0, 0, 0, 0, 0,
  4175. <:s><:#286,9360>       0, 0, 0, 0, 9, 1, 1, 1, 9, 0, 0, 0, 0, 0, 0, 0};
  4176. <:s><:#286,9360>
  4177. <:s><:#572,9360>This is actually a linear bitmap, which is the wrong format for compilation, but is easier on human eyes. Use the module XBMTOOLS to convert linear bitmaps into planar bitmaps, and vice-versa.
  4178. <:s><:#286,9360>  
  4179. <:s><:#286,9360>To compile this image for a mode 360 pixels (90 byte columns) across:
  4180. <:#286,9360>    char planar_eye<[>4*7 + 2]; 
  4181. <:#286,9360>    char far * EyeSize;
  4182. <:#286,9360>    (void) x_bm_to_pbm((char far *) eye, (char far *) planar_eye); 
  4183. <:#286,9360>    EyeSize = x_sizeof_cbitmap((far char *) planar_eye); 
  4184. <:#286,9360>    CompiledEye = farmalloc(EyeSize); 
  4185. <:#286,9360>    (void) x_compile_bitmap(90, (far char *) planar_eye, CompiledEye);
  4186. <:s><:#286,9360>
  4187. <:s><:#2016,9360>Notice that both buffers must exist beforehand. Since<+!><+"> x_compile_bitmap<-"><-!> returns the size of the compiled code, in bytes, you can reallocate the bitmap immediately to the right size if using 
  4188. <+!><+">x_sizeof_cbitmap<-"><-!> seems inconvenient (reallocation may even be faster, though using the function is cleaner). The pointers are 32-bit because compiled bitmaps take so much space: they are at one end of the speed-versus-memory spectrum. A good
  4189.  rule of thumb is to allocate (3.5 * buffer-height * buffer-width) + 25 bytes (rounding up), then pare your bitmap down when you find out how much space you've actually used.
  4190. <:s><:#286,9360>
  4191. <:s><:#1430,9360>Since the compiled bitmap has to fit within one segment of memory, it cannot contain more than about 19,000 pixels. This will not be a limitation for most sane programmers. If you are not a sane programmer try splitting your huge, unwieldy image up into sma
  4192. ller parts. You can use the same gigantic bitmap if you divide it into horizontal slices for compilation. For that matter, dividing the source up that way will let you use a source bitmap large than 64K, which is an even sicker idea.
  4193. <:s><:#286,9360>
  4194. <:#1430,9360>Back to business. A bitmap is compiled for only one width of screen. If you are using a logical screen larger than your physical screen, call the bitmap compiler with the logical width. The important thing is the number of bytes per line. Notice that you do
  4195.  not have to be in a graphics mode to use this routine.This allows you to develop and compile bitmaps separately, with whatever utility programs you might cook up.
  4196. <:#286,9360>
  4197. <:s><:#293,9360>The final function is<+!><+"> x_put_cbitmap<-"><-!>.
  4198. <:s><:#286,9360>To plot our eye at (99, 4), on the page which starts at location 0: 
  4199. <:#286,9360>    x_put_cbitmap(99, 4, 0, CompiledEye);
  4200. <:s><:#286,9360>
  4201. <:s><:#579,9360>This function depends on the global variable <+">ScrnLogicalByteWidth<-"> from the module XMAIN, which should be the same number as the column parameter you used to compile your bitmap.    
  4202. <:s><:#286,9360>
  4203. <:#858,9360>The XCBITMAP module supports memory-to-VGA blits only. XLIB also includes non-masking routines which can quickly save and restore the background screen behind your bitmap, using fast string operations.
  4204. <:s><:#286,9360>
  4205. <:#858,9360>This module is part of the XLIB package, and is in the public domain. If you write something which uses it, though, please send me a copy as a courtesy  if for no other reason so I can tilt my chair back and reflect that it may have been worth the trouble a
  4206. fter all.
  4207. <:s><:#286,9360>
  4208. <+B><:#286,9360>The included program DEMO2.C demonstrates the performance difference between planar bitmap
  4209. <+@><:s> masked blits and compiled bitmap blits.<:p<* >>
  4210. <+B><:#286,9360><+!>Blits and Pieces<:X11,-32768;TOC 2 "Blits and Pieces"><-!>
  4211. <+B><:s><:#286,9360>by Matthew MacKenzie
  4212. <:s><:#286,9360>
  4213. <:s><:#572,9360>The XCLIPPBM module contains clipping versions of two of the three routines in the XPBITMAP module:  
  4214. <:s><:#286,9360>
  4215. <:s><:#293,9360><+!><+">x_clip_pbm<-"><-!> - transfers a planar bitmap to the screen, clipping off any part outside a bounding box.  
  4216. <:#293,9360><+!><+">x_clip_masked_pbm<-"><-!> - does the same thing, but transfers only non-zero  pixels.
  4217. <:s><:#286,9360>
  4218. <:s><:#572,9360>The planar bitmap format is described elsewhere.  Here we will look at the clipping itself, since it is the only distinguishing feature of this module.
  4219. <:s><:#286,9360>
  4220. <:#872,9360>The bounding box is made up of four integers,<+"> TopBound, BottomBound, LeftBound,<-"> and 
  4221. <+">RightBound<-">. <+#>Unlike most global variables in XLIB, these are meant to be written to<-#>. In fact, they start out uninitialized.  
  4222. <+#>Be sure to set them before you try plotting any clipped bitmaps<-#>.
  4223. <:#1430,9360>Note that these are not the same variables which are used in the other clipping modules in XLIB.  This is because the two systems are incompatible: the other modules clip horizontally to columns while this one clips to pixels. As you might have guessed, tho
  4224. se functions and these were developed in different hemispheres of the planet. If it's any consolation, this does give you two independent bounding boxes to futz with, should the mood visit you.
  4225. <:s><:#286,9360>
  4226. <:#1158,9360>Bitmaps cannot go outside the perimeter of the bounding box, but they can overlap it. If 
  4227. <+">TopBound<-"> equals <+">BottomBound<-">, for example, a horizontal slice of a bitmap may still be plotted. It is safe to turn the box "inside out" to make sure nothing will be plotted. This is the first thing each routine checks for.
  4228. <:s><:#286,9360>
  4229. <:s><:#286,9360>To plot a bitmap, minus its zero pixels, minus anything outside the bounding box:
  4230. <:s><:#286,9360>
  4231. <:s><:#293,9360><+!><+">x_clip_masked_pbm<-"><-!> (int X, int Y, int ScreenOffs, char far * Bitmap);
  4232. <:s><:#286,9360>
  4233. <:#1723,9360>The arguments are in the same order as those for <+!><+">x_put_masked_pbm<-"><-!> in the module XPBITMAP.  The bounding box is relative to the given ScreenOffs ). This lets you perform page flipping without worrying about what screen you are clipping to it'
  4234. s always the current screen. The bitmap itself, of course, is not affected; clipping is performed on-the-fly. Both functions return an integer which indicates whether any part of the bitmap was inside the bounding box. If the entire bitmap was outside, a 1 
  4235. is returned; otherwise, a 0.
  4236. <:s><:#286,9360>
  4237. <:s>The third function in XPBITMAP, for which this module has no equivalent, copies from video RAM to system RAM. The absence of such a routine may seem at first like a disadvantage but this, like so many things in this life, is an illusion.  You can use the un
  4238. clipped routine, and clip the bitmap when you want to plot it back onto the screen.<:p<* >>
  4239. <+B><:#286,9360><+!>Wheel Have to See About That<:X11,-32768;TOC 2 "Wheel Have to See About That"><-!>
  4240. <+B><:s><:#286,9360>by Matthew MacKenzie
  4241. <:s><:#286,9360>
  4242. <:s><:#286,9360>
  4243. <:s><:#286,9360>The XCIRCLE module contains two functions, neither of which should be a big mystery:
  4244. <:#293,9360>    <+!><+">x_circle<-"><-!>, oddly enough, draws a circle.  
  4245. <:#293,9360>    <+!><+">x_filled_circle<-"><-!> does too, only the circle is filled (in some libraries this is called a disc).
  4246. <:s><:#286,9360>
  4247. <:#3725,9360>The word `circle' here refers to a round thing which is as many pixels tall as across. It only looks like a circle in 320x240 mode, the original mode X, and in 376x282 mode. In both functions, the circle is specified by the coordinates of the upper-left-han
  4248. d corner of the smallest box which holds it, and the diameter. Some circle functions have you specify a center point; this system is kind of odd because a circle with an even diameter does not have a particular pixel for a center. Every circle, on the other
  4249.  hand, has a box with an upper-left corner. <+#>No bounds are checked<-#>. A diameter of zero will draw nothing, and a negative diameter will blow your VGA board into hundreds of thousands of tiny little smoldering fragments. Neither function supports clipp
  4250. ing. The calculation of the circle is based on an algorithm described by Michael P. Lindner in a letter to the editor on page 8 of 
  4251. <+#>Dr. Dobb's Journal <-#>#169 (October 1990).  The algorithm has been rearranged to allow drawing and moving the plots in the eight octants to be performed in one step, so that each pixel does not have to be loaded into the CPU twice. 
  4252. <+!><+"> x_filled_circle<-"><-!> does not take advantage of this optimization because it handles different parts of each plot at different times.
  4253. <+@><:#286,9360>
  4254. [Embedded]
  4255. 00205799
  4256.